|
To access the contents, click the chapter and section titles.
HTML 4.0 Sourcebook
CITE Element: CitationCITE marks a small citationfor example, a book or other document reference. Typically, this block of text will be rendered in italics, subject to the capabilities of the browser. CODE Element: Typed CodeThe CODE element marks a selection of typed computer codefor example, a single line of code from a program. Large selections of code should be displayed using a PRE element, which properly reproduces space characters and line breaks. CODE element contents should be rendered in a fixed-width typewriter font. DFN Element: Defining Instance or DefinitionDFN marks a selection of text as the defining instance of a term. The text content should be rendered in italics, as demonstrated by Internet Explorer. Netscape Navigator, however, renders DFN content with an unmodified font. EM Element: EmphasisEM marks a block of text for emphasis. Typically, the marked block of text is rendered in italics, subject to the capabilities of the browser. For example, lynx represents EM emphasized text by an underline. KBD Element: Keyboard InputKBD marks a block of text as keyboard input. Typically, this is displayed with a fixed-width typewriter font. Q Element: Short Inline Quotation (Internet Explorer 4 Only)
Q marks an inline sequence of text that is a quotation. A browser should render this appropriate to the language, for example by surrounding the text with appropriate punctuation symbols, such as quotation marks. Q also supports an optional CITE attribute, which takes as its value a URL referencing the source of the quotation. This element is supported by Internet Explorer 4, although this browser does not assign any special formatting to the elementspecial formatting must be assigned, by the author, via a style sheet. SAMP Element: Literal CharactersSAMP marks a block of text as a sequence of literal or sample characters. Typically, this is rendered in a fixed-width typewriter font. STRONG Element: Strong EmphasisSTRONG marks a block of text for strong emphasis. Typically, this is rendered in boldface, although text-only browsers, such as lynx, use an underline (with lynx, EM and STRONG emphasis are displayed in the same way). VAR Element: A VariableVAR marks a variable name. This is typically rendered in italics or bold italics. Physical Phrase-Level ElementsB Element: BoldfaceB marks an inline block of text to be rendered in boldface. If this is impossible, the browser can render it in some other way (lynx uses an underline). BIG Element: Text with Enlarged Font
BIG marks text that should be rendered, when possible, with a font slightly larger than the font of the surrounding text. Enclosed images are not affected. BIG is ignored if a larger font is not available. BIG is equivalent to a FONT element with <FONT SIZE="+1">. Note that BIG is not allowed inside PRE. BIG is supported by Netscape Navigator 3, Internet Explorer 3, and later. FONT Element: Select Text Font Size and Color
FONT marks text that should be rendered in modified color, size, or font face. FONT has no effect on enclosed IMG elements. FONT can take three attributes: SIZE for the font size, COLOR for the font color, and FACE for the font face. Note that FONT is not allowed inside PRE.
Examples showing the use of FONT are shown in Figures 6.49 and 6.50. The supported attributes and their meanings are: COLOR=#rrggbb, or color (optional) Specifies the desired color for the text, either as a hexadecimal RGB code or as a named color. If using this attribute, be careful that the text color contrasts well with the display background. FACE=string (optional) This attribute, introduced by Microsoft but now widely supported, lets an author specify the desired typeface (FACE=Arial, Times, etc.) to be used for the displayed text. Supported names depend on the fonts installed on the users computer and on the browser; for example, on a typical Windows 95 system, the name Helvetica works with Netscape Navigator 3 but not Internet Explorer 3. Note also that the names are tied to the Microsoft font names, and many fonts by these names are not found on other platforms (Macintosh or UNIX) or other PC operating systems (OS/2). On any system, FACE only works if the designated font is installed on the system. FACE names are space sensitive. Thus to request the Arial black font you need FACE=Arial black and not FACE=Arialblack. Names are not, however, case sensitive. You can specify multiple fonts by separating the font names by commas. Thus FACE=Arial,helvetica,times asks the browser to first try the Arial font, followed by Helvetica (if Arial is not present), and finally the times font (if Helvetica is not present). Some font names are shown in Table 6.13 and are shown rendered in Figure 6.50.
|
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. |