What effect would the following coding have?
What effect would the following coding have?
< STYLE TYPE="text/css" >
H1 P EM{background-color : #FFFF00}
H1 {color: #00FF00}
The tags H1, P, EM would have a yellow background and the text would be green
What effect would the following coding have?
< STYLE TYPE="text/css" >
H1,P,EM{background-color : #FFFF00}
H1 {color: #00FF00}
The emphasis within a P tag within an H1 tag would have a yellow background color. H1 text color would be green.
What does !important do? Where would you use it and why?
!important is very important. It overweighs all other considerations, and it always goes at the end of the declarations, right before the semicolon. If the !important were placed anywhere else in the font declaration, then that entire declaration would very likely be invalidated and none of the styles applied. It carries the most weight in the hierachy of the styles.
Please write the style rule that would allow this sentence to be correct:
This text is displayed in italics. This sentence is displayed as boldface and italics. This text is displayed in italics.