You are on page 1of 12

WEB ENABLED TECHNOLOGY

Semester-II(2024-25)

HTML(Lect3)

Department of DSAI

January 10, 2024

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...

Example <! DOCTYPE HTML>


<HTML>
<HEAD>
<TITLE>Example of paragraph tag</TITLE>
< /HEAD>
<BODY bgcolor=pink>
<p> First paragraph Content<p>
<p> Second paragraph Content<p>
<p> Third paragraph Content<p>
</BODY>
</HTML>

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...

Heading style Tag


1 Page headings are created with the ¡hn¿ tag, in which n is a number
between 1 and 6.
2 Browsers automatically add some empty space (a margin) before and
after each heading.
3 All the styles appear in BOLDFACE and the size of the heading
depends on the level chosen ,i.e .<h1> to <h6>.
4 As the number next to <h>(1,2..6) increases, the font size actually
decreases.

7/12
DSAI WEB ENABLED TECHNOLOGY January 10, 2024
TEXT FORMATTING cont

Example of Heading Style Tag


<html>
<head><title> different heading style</title></head>
<body>
<h1>ICFAI Foundation for Higher Education, Hyderabad </h1>
<h2>ICFAI Foundation for Higher Education, Hyderabad </h2>
<h3>ICFAI Foundation for Higher Education, Hyderabad </h3>
<h4>ICFAI Foundation for Higher Education, Hyderabad </h4>
<h5>ICFAI Foundation for Higher Education, Hyderabad </h5>
<h6>ICFAI Foundation for Higher Education, Hyderabad </h6>
</body>
</html>

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

You might also like