Introduction
- Today, we will learn about three important style tags in HTML: BOLD, ITALIC, and UNDERLINE.
- These tags help in emphasizing text in a webpage.
BOLD Tag
- To make text bold, we use the
<b>
tag. - Another tag for bold text is
<strong>
. It has the same visual effect but is used for important text. - Example:
<b>This text is bold.</b>
<strong>This text is also bold.</strong>
Both tags will make the text appear thicker and darker.
ITALIC Tag
- To make text italic, we use the
<i>
tag. - Another tag for italic text is
<em>
. It emphasizes text with more importance. - Example:
<i>This text is italic.</i>
<em>This text is also italic.</em>
Both tags will make the text slanted to the right.
UNDERLINE Tag
- To underline text, we use the
<u>
tag. - Example:
<u>This text is underlined.</u>
- his tag will draw a line under the text.
Combined Use
- You can combine these tags to apply multiple styles to the same text.
- Example:
<b><i><u>This text is bold, italic, and underlined.</u></i></b>
Practice Examples
- Bold text:
<b>Hello, World!</b>
- Italic text:
<i>Hello, World!</i>
- Underlined text:
<u>Hello, World!</u>
- Combined text:
<b><i><u>Hello, World!</u></i></b>
Key Points
<b>
and<strong>
make text bold.<i>
and<em>
make text italic.<u>
makes text underlined.- These tags can be nested to apply multiple styles.
Conclusion
- Use these tags to highlight important information on your webpage.
- Remember the difference between
<b>
and<strong>
, and between<i>
and<em>
.
Exam Notes
- Bold Text:
- Tags:
<b>
,<strong>
- Example:
<b>This is bold.</b>
,<strong>This is bold.</strong>
- Tags:
- Italic Text:
- Tags:
<i>
,<em>
- Example:
<i>This is italic.</i>
,<em>This is italic.</em>
- Tags:
- Underlined Text:
- Tag:
<u>
- Example:
<u>This is underlined.</u>
- Tag:
- Combined Use:
- Example:
<b><i><u>This text is bold, italic, and underlined.</u></i></b>
- Example:
These points will help you in exams to recall and write the correct HTML tags for styling text.
Summary : bold , italic and underline tag in html
Summary Table
Tag | Purpose | Example |
---|---|---|
<b> | Bold text | <b>Bold Text</b> |
<strong> | Bold text with emphasis | <strong>Bold Text</strong> |
<i> | Italic text | <i>Italic Text</i> |
<em> | Italic text with emphasis | <em>Italic Text</em> |
<u> | Underline text | <u>Underlined Text</u> |