![]() |
|
กก |
![]() |
You may recall that in Chapter 3, I made a point about using headings to emphasize text within a paragraph. (For those of you who missed it, the point was that you can't use headings that way.) I also promised to show you how to highlight text. That's what this chapter is about, among other things. Logical Style TagsThe "correct" way to highlight text is to use the logical tags, which do not directly specify the type of highlighting they will employ. There are 'defaults' written into the specification (see the quotations below) but there is no direct rule about which tag should be displayed in what way. This is entirely in keeping with HTML's structural nature.
These tags are recommended for use because they leave the most control to the reader of a document. However, in the real world, the tags in the next section are a lot more popular than those above. Forced Style TagsThe tags I will cover here are sometimes called forced style tags, because their very nature forces a certain style within the document (at least, that's the idea). This does run counter to the entire "HTML is purely structural" philosophy, but my advice is not to worry about it too much. As long as you use the logical style tags where appropriate, then you're fine. The four most commonly used forced style tags are very simple:
In some browsers, especially Netscape up to 1.12/1.22, the underline tag is not recognized. This is because the underline tag is still being proposed for inclusion in the HTML specification. As of this writing, it was still not part of official HTML 2.0 but part of the 3.0 draft. Most browsers do support underlining, but be aware that you cannot count on this. If the word "underlined" in the explanation for Underline, above, is in fact not underlined, then your browser does not support the underline tag. Horizontal RulesThe horizontal rule is a pretty useful effect. Horizontal rules are not allowed within headings. The tag, which is empty, is <HR>, and produces the following: This is a quick, nearly painless way of throwing in a section divider. In the past, this effect could only be achieved using an in-line image, which just slows everything down (consider the difference in size and download time between a 1K graphic and four text characters). There. That was pretty easy, wasn't it? Now that you have everything you need to arrange your text, it's time to start linking things together.
|
|||
กก | ||||
![]() |