ID selector
Class selector
Group selector
Universal selector
:default
:%
:disabled
None of these
bright
hidden
ridge
groove
The size of the text-shadow
he Y-coordinate of the text-shadow
The X-coordinate of the text-shadow
The blur radius
Padding is used to create space around an element's content, inside of any defined borders.
There are properties for setting the padding for each side of an element.
To shorten the code, it is possible to specify all the padding properties in one property.
All of the options
clear
overflow
z-index
display
Easier to maintain and update
Greater consistency in design
More formatting options.
All of the above
border-width
border-bottom
border-width-bottom
border-bottom-width
focus
hover
active
checked
Match the CSS Sub-Selector with Its Meaning
A → 2, B → 1, C → 3, D → 6
A → 2, B → 1, C → 3, D → 4
A → 2, B → 5, C → 3, D → 4
A → 5, B → 1, C → 3, D → 4
ul > li
ul li
ul + li
ul ~ li
rect
crosshair
auto
inherit
list-style-type: none;
text-decoration: none;
bullet-style: none;
display: no-bullet;
HTML
CSS
JavaScript
PHP
text-size
size
text-length
font-size
h1 h2 h3
h1+h2+h3
h1,h2,h3
h1>h2>h3
border-spacing
border-style
border-collapse
border-radius
jQuery
Opacity
Visibility
Stacking order
Font size
What will happen in the following case ?
h1 {color: red text-decoration: underline; font-style: italic;}
color: red, text-decoration: underline and font-style: italic all works
text-decoration: underline and font-style: italic works
color red, text-decoration: underline works
only font-style: italic works
Name
ID
Class
Tag
class
id
article
html
type
None of the above
content p
p.content
.content > p
p .content
:valid
:required
:optional
:invalid
REL
URL
REV
all of these
h1.hover
h1*hover
h1:hover
h1-hover
input:checked
input:focus
input:hover
input:active
absolute
static
fixed
relative
margin: 20px 20px 30px 30px
margin: 30px 20px
margin: 20px 30px
margin: 30px 30px 20px 20px
Documents to be viewed on-screen tend to look better in Sans-serif fonts
Not everyone has the same set of fonts.
Printed documents tend to look better in Serif fonts
Match the CSS User Action Pseudo-Class with Its Effect
A → 4, B → 3, C → 2, D → 1
A →5, B → 4, C → 3, D → 2
A → 6, B → 2, C → 3, D → 4
A → 5, B → 2, C → 3, D → 6
Easier to maintain and update.
Greater consistency in design.
mouse over
mouse hover
mouse move
color:red, text-decoration:underline works
only font-style:italic works
color:red, text-decoration:underline and font-style:italic all works
text-decoration:underline and font-style:italic works
Combinator selector
Pseudo Class selector
Pseudo elements selector
Attribute selector
Rich Decorations
Faster download times.
No need to write HTML Tags
:element
:empty
:enabled
It consists of Margin, Padding, Border, Content
It consists of Padding, Border, Shadow
It consists of Content, Outline, Shadow
It consists of Border, Margin, Shadow
.(dot)
# (hash)
* (asterisk)
@ (at sign)
:target
:selection
::selection
URO
.example
#example
element.example
example
Some selectors can lead to cross-browser issues
Cannot request a webpage through CSS
Parent Selector tag is always available
Cannot always assure compatibility with every browser
Selects the first child of an element
Selects all sibling elements
Selects the immediately next sibling of an element
Selects the parent of an element
:focus
:active
:hover
:visited
order
stack
layer
:nth-child(last)
:last-child
:only-child
:nth-last-child(1)
#classname
.classname
element.classname
*classname
Apply styles for the web page
Define structure of the web page
Provide meaning to the sections of the web page