3.5 HTML Text Formatting
HTML offers you two ways in which you can emphasize your text: with logical markers and physical markers. Logical markers allow your users to choose how to view important text for example in bold, red lettering say in all their web pages, while physical formatting appears how you, the page’s designer wanted it to be.
The logical style informs the browser what kind of text to present. The browser takes care of how to present it. For example the <STORNG> tag tells the browser that strong emphasis must be given. The browser takes care of how to present it, so that it gets the strong emphasis required. The following are some of the logical style tags.
|<EM>…</EM>||Basic emphasis. Normally rendered in italic style.|
|<STRONG>…</STRONG>||Strong emphasis. Normally rendered in bold style.|
|<SAMP>…</SAMP>||Sample outputs from programs, scripts etc.|
|<CODE>…</CODE>||Extracts of program code|
|<VAR>….</VAR>||Variables or arguments to commands|
|<CITE>….</CITE>||Citation of reference to other sources.|
Physical style format tags explicitly inform the browser how the characters must be shown, whether in bold, italics etc. The following are some of the physical style tags.
|<STRIKE> </STRIKE>||Strike through|
Tips: Note all browsers can display all text formatting, Eg. <STRIKE> is not supported by some browsers.
The <FONT> tag is used to set specific font and size. It usually has two attributes, namely face and size.
<FONT FACE =”VERDANA” SIZE = 35>
Web technologies by David Hunter
Pre, P and BR tags
The <PRE> tag can be used to display content in preformatted text which is a typographic font. You can use a <BR> tag to insert a line break in your document. Inorder to start a new paragraph you could use the <P> tag.