HTML and CSS Reference
In-Depth Information
}
h1
{
color : #BCA55F;
background - color : #3C371E;
font - family : ”Arial Black” , Gadget , sans - serif ;
text - align : center ;
}
h2
{
color : #F26205;
font - family : ”Lucida Sans Unicode” , “Lucida Grande” , sans - serif
}
h3
{
color : #3C371E;
font - family : Tahoma , Geneva , sans - serif ;
}
h e top line lets the browser know that it's a UTF-8 character set, and the second two lines are
comment lines. h ey're dif erent from the comment lines in HTML5, but they work the same.
h e second comment line is a handy way to keep track of the color palette and can save time
in setting up the style sheet.
To test this mobile version of the CSS3 code, the following HTML5 i le ( ExternalSmall.
html in this chapter's folder at www.wiley.com/go/smashinghtml5 ) is used:
56
<! DOCTYPE HTML >
< html >
< head >
< link rel = ”stylesheet” type = ”text/css” href = ”mightySmiteSmall.css” />
< meta http - equiv = ”Content-Type” content = ”text/html; charset=UTF-8” >
< title > Mighty Smite Sofware Test Sheet </ title >
</ head >
< body >
< h1 > Mighty Smite Software Conglomorate </ h1 >
< h2 > This is an h2 head </ h2 >
< h3 > Here's an h3 head </ h3 >
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut abore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
exercitation ullamco aboris nisi ut aliquip ex ea commodo consequat. Duis aute
irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
deserunt mollit anim id est aborum.
</ body >
</ html >
All the styles in the CSS3 i le are used to test their appearance, and the body text beginning
with Lorem ipsum is i ller text, used to get an idea of what a text block looks like. (It's been
used since the 16th century, so it must be good.)
 
Search WWH ::




Custom Search