Professional Documents
Culture Documents
Semester-II(2024-25)
HTML(Lect3)
Department of DSAI
1/12
DSAI WEB ENABLED TECHNOLOGY January 10, 2024
TEXT FORMATTING
Text Formatting tags are used to apply formatting to the text. They
render the text in different formats according to the tag used.
Paragraph tag
1 HTML paragraph tags are used to define the HTML paragraph
element. The paragraph element begins with the HTML <p> tag and
ends with the HTML </p> tag. The HTML paragraph element should
not contain tables and other block elements.
2 Browsers automatically add an empty line before and after a paragraph.
2/12
DSAI WEB ENABLED TECHNOLOGY January 10, 2024
TEXT FORMATTING cont...
3/12
DSAI WEB ENABLED TECHNOLOGY January 10, 2024
TEXT FORMATTING cont..
Output page
4/12
DSAI WEB ENABLED TECHNOLOGY January 10, 2024
TEXT FORMATTING cont...
Line breaks
1 The line break tag is the <br> tag in HTML.
2 A <br> will insert a line break which means the text/image following
the tag will be moved to the next line when displayed in the browser.
Example
<! DOCTYPE HTML>
<HTML>
<HEAD>
<TITLE>Example of Line break tag</TITLE>
< /HEAD>
<BODY bgcolor=yellow>
<br> FST<br> IBS <br> Law School
</BODY>
</HTML>
5/12
DSAI WEB ENABLED TECHNOLOGY January 10, 2024
TEXT FORMATTING cont..
Output page
6/12
DSAI WEB ENABLED TECHNOLOGY January 10, 2024
TEXT FORMATTING cont...
7/12
DSAI WEB ENABLED TECHNOLOGY January 10, 2024
TEXT FORMATTING cont
8/12
DSAI WEB ENABLED TECHNOLOGY January 10, 2024
TEXT FORMATTING cont...
Output page
9/12
DSAI WEB ENABLED TECHNOLOGY January 10, 2024
TEXT FORMATTING cont...
TEXT STYLES
Bold:
Display the text in boldface style. The tag used are <b>. . . ..</b>.
Italic :
Display the text in italics style. The tag used are <i>. . . ..</i>.
Underline: Displays text as underlined. The tag used are
<u>. . . ..</u>..
OTHER TEXT EFFECTS
<center>. . . . . . </center>. . . : The <center> tag is used to
center-align text/ images .
<big>. . . .</big> : Make text bigger than normal.
<small>. . . </small>:Make text smaller than normal.
<strike>. . . </strike>: strikethrough the text.
<sub>. . . .</sub> : Defines subscripted text .
<sup>. . . </sup>:Defines superscripted text.
<blink>. . . </blink>: Makes the text blinking 10/12
DSAI WEB ENABLED TECHNOLOGY January 10, 2024
TEXT FORMATTING cont...
Example:
<HTML>
<HEAD>
<TITLE>Example of Text style tag</TITLE>
< /HEAD>
<BODY bgcolor=red>
<b> ICFAI Foundation for Higher Education</b><br><br>
<i> ICFAI Foundation for Higher Education</i><br><br>
<u> ICFAI Foundation for Higher Education</u><br><br>
<big> FST,Hyderabad</big><br><br>
<small> FST,Hyderabad</small><br><br>
<strike> FST,Hyderabad</strike><br><br>
<sup>N</sup>3<br><br>
H <sub>2</sub>O<br><br>
</BODY>
</HTML>
11/12
DSAI WEB ENABLED TECHNOLOGY January 10, 2024
TEXT FORMATTING cont...
Output page
12/12
DSAI WEB ENABLED TECHNOLOGY January 10, 2024