46 Lesson 5
Web browsers give precedence to the style that appears closest to the tag.
So, inline styles (which appear as attributes within the tag itself) are most
important. Embedded styles (which appear at the top of the HTML file)
are applied next, and linked styles (which appear in another file alto-
gether) are applied last.
Imagine that you have created an embedded style for the
<h1> tag, but want
to change that style for one occurrence of the
<h1> tag in that document.
You would create an inline style for that new
<h1> tag. The browsers recog-
nize that fact and change the style for that tag to reflect the inline style.
Caution Style sheet precedence is supposed to place
more importance on embedded styles than on linked
style sheets. In actual practice, however, you’ll find
that both Internet Explorer and Netscape treat linked
sheets as more important than embedded sheets (but
they do treat inline styles as more important than
either of the other two). You’ll find that you have bet-
ter luck if you use either linked or embedded styles,
but not both.
Formatting Text with Styles
Text is the most important element of any Web page. Without text, there is
nothing on the page to help people decide whether it’s worth coming
Text on an HTML page is structured by the
<body>, <p>, <td>, <tr>,
<th>, <h1> <h6>, and <li> tags (among others). You can add your own
style preferences to each of these tags using the style properties shown in
Note Unless you (or the people viewing your pages)
have adjusted the browser’s default settings, normal
HTML body text appears in 12 point Times New
Roman font on most computer systems.