🙋🏻 HTML Formatting Tags
HTML formatting tags are used to format text and control how it is displayed in the browser. They allow you to add emphasis, style, and structure to your content. In this tutorial, you will learn about the most common HTML formatting tags and how to use them in your web pages.
HTML Formatting Tags
Here are some common HTML formatting tags that you can use to format text in your web pages:
<b>
: Bold text<strong>
: Strong text<i>
: Italic text
HTML Bold Text
HTML bold text is defined with the <b>
tag. The <b>
tag is used to make text bold. It is a presentational tag that is used to add emphasis to text.
<!DOCTYPE html>
<html>
<head>
<title>Bold Text Example</title>
</head>
<body>
<h1>This is a Heading</h1>
<p>This is <b>bold</b> text.</p>
</body>
</html>
This is a Heading
This is bold text.
In the example above, the <b>
tag is used to make the word "bold" bold. The text "This is bold text." is displayed as "This is bold text."
HTML Strong Text
HTML strong text is defined with the <strong>
tag. The <strong>
tag is used to make text strong. It is a semantic tag that is used to indicate that the text is important or has strong emphasis.
<!DOCTYPE html>
<html>
<head>
<title>Strong Text Example</title>
</head>
<body>
<h1>This is a Heading</h1>
<p>This is <strong>strong</strong> text.</p>
</body>
</html>
This is a Heading
This is strong text.
In the example above, the <strong>
tag is used to make the word "strong" strong. The text "This is strong text." is displayed as "This is strong text."
HTML Italic Text
HTML italic text is defined with the <i>
tag. The <i>
tag is used to make text italic. It is a presentational tag that is used to add emphasis to text.
<!DOCTYPE html>
<html>
<head>
<title>Italic Text Example</title>
</head>
<body>
<h1>This is a Heading</h1>
<p>This is <i>italic</i> text.</p>
</body>
</html>
This is a Heading
This is italic text.
In the example above, the <i>
tag is used to make the word "italic" italic. The text "This is italic text." is displayed as "This is italic text."
Summary
HTML formatting tags are used to format text and control how it is displayed in the browser. The <b>
tag is used to make text bold, the <strong>
tag is used to make text strong, and the <i>
tag is used to make text italic. Use these tags to add emphasis, style, and structure to your content.