Introduction Of Chapter 4
Text formatting in HTML helps make content more clear, attractive, and easier to read. Using formatting tags, we can highlight important words, create emphasis, add notes, or style text differently inside a webpage.
In this chapter, you will learn how to:
- Make text bold
- Write italic text
- Underline text
- Create small text
- Highlight text with color
These tags are simple but very important in web development.
Topic 1: Bold Text — <B>
1.<B> Tag
The <b> tag makes text visually bold.
For Example:
<p>This is <b>bold</b> text.</p>
The Will Be Output:
This is bold text.
Topic 2:Italic Text — <i>and <em>
These tags are used to make text italic.
1.<i> Tag
The <i> tag makes text italic for style purposes.
For Example:
<p>This is <i>italic</i> text.</p>
The Output will be:
This is italic text.
2. <em> Tag
The <em> tag also creates italic text but gives emphasis to the text.
For Exam Example:
<p>Please <em>read carefully</em>.</p>
The Output Will Be:
Please read carefully.
<em >is used for emphasis and accessibility.
3.Underline Text — <u>
The <u> tag underlines text.
For Example:
<p>This is <u>underlined</u> text.</p>
Output:
This is underlined text.
4. Small Text — <small>
The <small> tag makes text smaller than normal text.
Usually used for:
- notes
- copyright
- extra information
For Example:
<p>This is normal text.</p>
<p><small>This is small text.</small></p>
5.Highlight Text —<mark>
The <mark> tag highlights text with a yellow background by default.
For Example:
<p>HTML is very <mark>important</mark> for web development.</p>
Your Output Will be:
HTML is very important for web development.
practice time!!!!!!