Chapter 1. HTML and CSS

1.2.1. Rich Styling
<html>
<body><center>
<H1>Leaping Above The Water</H1>
</center><br><br>
</body>
</html>

1.2.1

1.2.2. Ease of Use
<html>
<body><center>
<H2><FONT COLOR=”purple”>This is purple!</FONT></H2>
</center><br><br>
</body>
</html>

1.2.2

1.4. Bringing CSS and HTML Together
<HTML>
<HEAD>
<TITLE>Eric’s World of Waffles</TITLE>
<LINK REL=”stylesheet” TYPE=”text/css” HREF=”sheet1.css” TITLE=”Default”>
<STYLE TYPE=”text/css”>
@import url(sheet2.css);
H1 {color: maroon;}
BODY {background: yellow;}
/* These are my styles! Yay! */
</STYLE>
</HEAD>
<BODY>
<H1>Waffles!</H1>
<P STYLE=”color: gray;”>The most wonderful of all breakfast foods is
the waffle– a ridged and cratered slab of home-cooked, fluffy
goodness…
</P>
</BODY>
</HTML>

1.4


1.4.1.1. LINK attributes

<html>
<body>
<LINK REL=”stylesheet” TYPE=”text/css” HREF=”basic.css”>
<LINK REL=”stylesheet” TYPE=”text/css” HREF=”splash.css”>
<LINK REL=”stylesheet” TYPE=”text/css” HREF=”sheet-a.css”>
<LINK REL=”stylesheet” TYPE=”text/css” HREF=”sheet-b.css”>

<P CLASS=”a1″>This paragraph will be gray only if styles from the
stylesheet ‘sheet-a.css’ are applied.</P>
<P CLASS=”b1″>This paragraph will be gray only if styles from the
stylesheet ‘sheet-b.css’ are applied.</P>
</body>
</html>

+1.4.1.1

1.4.6. Inline Styles

<html>
<body>
<P STYLE=”color: gray;”>The most wonderful of all breakfast foods is
the waffle– a ridged and cratered slab of home-cooked, fluffy goodness…
</P>
</body>
</html>

1.4.6