|
To access the contents, click the chapter and section titles.
HTML 4.0 Sourcebook
BR indicates a line break. This is fundamentally different from a paragraph element<BR> is treated as a character (like a hard carriage return), while P defines a text block as a paragraph. An example of BR is shown in Figure 6.9 and 6.10, where it is used to break lines in an ADDRESS. BR can also break lines in a poem, with P elements marking the different verses. BR takes the standard generic attributes CLASS, ID, STYLE, and TITLE, but does not take LANG nor the event-handling attributes. These attributes were described earlier in this chapter. In the case of text flow around right- and left-aligned images, tables, or other objects, an author must be able to specify how the text should break; that is, should the text simple continue at the next line that runs alongside the image, or should it break until the next line can be flush with the left, right, or both margins? In HTML, BR with an optional CLEAR can make this specification. The possible CLEAR values and their meanings are:
Note that HTML 4 recommends the use of style sheet rules, in place of a CLEAR attribute. For example, to implement a BR element that clears to the right margin, the STYLE element could contain: <STYLE> BR.rightimage {clear: right} </STYLE> with the body of the document containing BR elements of the form: Here is some text .... <BR CLASS="rightimage"> Some example of BR elements are shown in Figures 6.43 and 6.44. Special Markup: DEL, INS, and NOSCRIPTThere are two special elements, INS and DEL, used to denote inserted and deleted blocks of a document. These are designed for use in document management and revision, where it is important to track the various changes that have taken place in the document and either display these changes or let the reader toggle between different versions. Because of this purpose, INS and DEL are neither inline nor block elements: These elements can, in fact, contain either block or inline elements, depending on what content has been inserted or deleted. Figure 6.48 illustrates a possible rendering for the content marked up by these elements. Note, however, that this rendering can (and probably should) be altered using style sheet rules. HTML 4 permits INS and DEL elements anywhere inside the BODYincluding anywhere within any nonempty element lying inside the BODY, with the exception of SCRIPT and TEXTAREA. Most commonly, INS and DEL are used to indicate inserted or deleted blocks of text, but the markup model lets you also use INS and DEL to delimit inserted and deleted table rows, or inserted or deleted LI list items. Note, however, however, that Internet Explorer 4the only browser to currently support INS and DELdoes not support these elements around TD, TR or other table-markup elements. You must not use these elements to break the distinction between block-level and inline elements. For example, you cannot use markup of the form: <EM> emphasized text <INS> <DIV> here is a block of text </DIV> </INS> and some more emphasized text </EM> Although the content model formally permits this, it is nevertheless illegal, and EM element cannot contain a DIV. A general rule is to look at the document with the INS or DEL elements removed: If the resulting markup is illegal, then the INS or DEL elements are illegally placed in the document. This is why this book does not mention INS and DEL elements in the content rules listed earlier in this chapter, and also in Chapter 7. Last, the NOSCRIPT element contains HTML markup to be displayed by browsers that do not support scripting. NOSCRIPT is supported by most current browsers. DEL and INS are supported by Internet Explorer 4, but not Netscape Navigator 4. DEL Element: Deleted Text
This element marks text that has been deleted. The browser should display this in a distinctive way, for example by rendering it in a different color or with a line struck through it. This behavior can, of course, be modified using a style sheet. This element is supported by Internet Explorer 4 (by default, the text is rendered with an underline), but is not supported by Netscape Navigator 4.
|
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement. |