- Shuffle
Toggle OnToggle Off
- Alphabetize
Toggle OnToggle Off
- Front First
Toggle OnToggle Off
- Both Sides
Toggle OnToggle Off
Front
How to study your flashcards.
Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key
Up/Down arrow keys: Flip the card between the front and back.down keyup key
H key: Show hint (3rd side).h key
![]()
PLAY BUTTON
![]()
PLAY BUTTON
![]()
39 Cards in this Set
- Front
- Back
|
What is the largest building block of a style sheet?
|
A rule
|
|
What are the parts of a rule?
|
Selector and declaration
|
|
What are the types of elements that a selector can be applied to?
|
HTML elements
Elements with a class Elements with an ID |
|
What are three examples of HTML elements?
|
Elements with <body> tag
Elements with <p> tag Elements with <h1> tag |
|
How many types of elements can a selector be applied to?
|
3
|
|
What is an example of an element with a class?
|
<p class="content">
|
|
What is an example of an element with an ID?
|
<p ID="warning1">
|
|
In
H1 {font-size: 1.8em;} what is "font-size"? |
A property
|
|
In
H1 {font-size: 1.8em;} what is "1.8em"? |
The value of the property
|
|
When should you use a semicolon?
|
At the end of every value in a rule
|
|
What's the problem with the following rule?
body {color: #000088;} |
Older browsers have a problem with inheritance. You need to specify exactly which selectors are to be this color.
|
|
How would you group body, paragraph, and the largest heading and give them all the color of 000088?
|
body, p, h1 {color: #000088;}
|
|
What are the two types of elements?
|
Blocklevel and inline
|
|
What is a blocklevel element?
|
Begins a new line
|
|
What is an inline element?
|
One that doesn't force a line break
|
|
Give 3 examples of blocklevel elements.
|
<p>, <div>, <h1>
|
|
Give 3 examples of inline elements.
|
<a>, <span>, <strong>
|
|
What type or types of elements can blocklevel elements be children of?
|
Other blocklevel elements
|
|
What type of type of elements can inline elements be children of?
|
Blocklevel, inline, and list elements
|
|
What is a list element?
|
A special type of blocklevel element
|
|
What is an image or form element?
|
Replaced element
|
|
Is a replaced element blocklevel or inline?
|
Inline, but can be a blocklevel element
|
|
If you want to apply styling to something other than an HTML element, what do you use?
|
<div> or <span>
|
|
What's the difference between <div> and <span>?
|
<div> is blocklevel, <span> is inline
|
|
You define a block or inline element by applying a...?
|
class
|
|
Class and ID attributes can be used with what HTML elements?
|
All of them
|
|
What's the difference between class and ID attributes?
|
Class can be used multiple times, ID only once.
|
|
What precedes a class?
|
A dot
|
|
What precedes an ID?
|
#
|
|
What do CSS1 specifications prohibit in naming classes and IDs?
|
Can't start with a number
|
|
How can Javascript interfere with classes and IDs?
|
If a class or ID's name is the same as a reserved word in Javascript, it may interfere.
|
|
To what elements may a class apply?
|
<body>, <p>, <div>, <span>
|
|
Which has more weight, class or ID?
|
ID
|
|
How many values may a class have?
|
Any number.
|
|
How many values may an ID have?
|
One.
|
|
What should be avoided in class and ID names?
|
Underscores.
|
|
If you want small, red type for minor notes, what is preferable to naming the class smallRed?
|
minorNote
|
|
What are pseudo-classes used for?
|
To change the appearance of links.
|
|
What does a pseudo-element do?
|
Sets the style for part of an element, like a first letter or first line
|