11
Web Development Lecture # 09 Text Formatting in HTML

Web Development Lecture # 09 Text Formatting in HTML

Embed Size (px)

Citation preview

Page 1: Web Development Lecture # 09 Text Formatting in HTML

Web Development

Lecture # 09

Text Formatting in HTML

Page 2: 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”.

Page 3: Web Development Lecture # 09 Text Formatting in HTML

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.

Page 4: Web Development Lecture # 09 Text Formatting in HTML

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.

Page 5: Web Development Lecture # 09 Text Formatting in HTML

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

Page 6: Web Development Lecture # 09 Text Formatting in HTML

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.

Page 7: Web Development Lecture # 09 Text Formatting in HTML

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>

Page 8: Web Development Lecture # 09 Text Formatting in HTML

Text Formatting

Super Script– <SUP>…</SUP>

Sub Script– <SUB>…</SUB>

Page 9: Web Development Lecture # 09 Text Formatting in HTML

Text Styles Bold <B> and </B> Italics <I> and </I> Underline <U> and </U>

Text Effects Center < Center > and </ Center

>

Spacing < Spacer > Attributes

TYPESIZE

Page 10: Web Development Lecture # 09 Text Formatting in HTML

Preformatted Tex <PRE> and </PRE> Controlling Font Size & Color <FONT>

and </FONT>

Attributes– FONTFACE– SIZE– COLOR

Other Text Effects

Page 11: Web Development Lecture # 09 Text Formatting in HTML

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