Upload
linda-watson
View
221
Download
0
Embed Size (px)
Citation preview
Web Development
Lecture # 09
Text Formatting in HTML
Text Formatting Paragraph Tag
“Indicates that the enclosed text is a logical unit.”
<P>…</P> Places one or two blank lines at start and end depending on the
browser.
Attributes– ALIGN
“This attribute specifies the alignment of the text within a paragraph.”
Values• Left• Right• Center
The default value is “left”.
Text Formatting
Line Breaks “This element enforces a line break.”
<BR> This is single tag (or empty element) having no
closing tag. A single <BR> element goes to the next line. To insert blank lines, use multiple <BR> elements.
Text Formatting
Headings“The heading elements are used to create headlines in the documents” These are used to convey the logical meaning about document’s
structure. These display the enclosed text in large & bold font style. We don't know the exact size of their font as it differs with browsers. Six different levels of headings are supported.
<H1>…</H1> to <H6>…</H6> <H1> is most important. <H6> is least important.
Text Formatting Drawing Lines/Horizontal Rules <HR>
“This element is used to insert a horizontal rule to visually separate
document sessions.” In speech based browsers, a horizontal rule theoretically could be
interpreted as a pause.
Attributes– ALIGN
Values• Left• Right• Center
Text Formatting
Drawing Lines/Horizontal Rules Cont.– SIZE
“This argument specifies the height of the line in pixels.”
– WIDTH “This argument specifies the width of the line in pixels or %age of the screen width.”
– NOSHADE“Causes the line to be rendered without surrounding shadow.”
– COLOR“This argument specifies the color of line. Its value can be a color name or hexadecimal representation of R,G & B.
Text Formatting
Typewriter– <TT>…</TT>
Strike Through– <STRIKE>… </STRIKE>– <S>..</S>
Big Font– <BIG>..</BIG>– <BIG><BIG>..</BIG></BIG>
Small Font– <SMALL>… </SMALL>– <SMALL> <SMALL>… </SMALL> </SMALL>
Text Formatting
Super Script– <SUP>…</SUP>
Sub Script– <SUB>…</SUB>
Text Styles Bold <B> and </B> Italics <I> and </I> Underline <U> and </U>
Text Effects Center < Center > and </ Center
>
Spacing < Spacer > Attributes
TYPESIZE
Preformatted Tex <PRE> and </PRE> Controlling Font Size & Color <FONT>
and </FONT>
Attributes– FONTFACE– SIZE– COLOR
Other Text Effects
Code<BODY><FONT FACE="Comic Sans Ms">CHECK<BR> </FONT><FONT FACE="Brush Script MT">CHECK<BR> </FONT><FONT FACE="Arial Black">CHECK<BR> </FONT></BODY>
Output
Fig. 1.6