Example of Text Formatting
<!DOCTYPE html>
<html>
<head>
<title>
HTML text formatting
</title>
</head>
<body>
<h2>Welcome To w3wiki</h2>
<!--Text in Bold-->
<b>Hello Geeks</b>
<br>
<!--Text in Strong-->
<strong>Hello Geeks</strong>
<br>
<!--Text in Italic Text-->
<i>Hello Geeks</i>
<br>
<!--Text in Emphasized-->
<em>Hello Geeks</em>
<br>
<!--Text in marked-->
<mark>Hello Geeks</mark>
<br>
<!--Text in deleted-->
<del>Hello Geeks</del>
<br>
<!--Text in inserted-->
<ins>Hello Geeks</ins>
<br>
<!--Text in subscript-->
<p><sub>Hello</sub> Geeks</p>
<br>
<!--Text in superscript-->
<p><sup>Hello</sup> Geeks</p>
<br>
</body>
</html>
Output:
HTML Text Formatting
HTML Text Formatting provides various tags for text formatting to enhance the visual presentation of content on a webpage. You can make your text bold, italic, etc. by using some HTML tags. When creating web content, effective text formatting is important for improving readability and user experience. In this guide, we’ll explore various HTML tags that allow you to format text, making it visually attractive and semantically meaningful.
HTML text formatting can be categorized into two techniques:
- Logical Tags: These tags denote the logical or semantic value of the text. They convey meaning without directly affecting the visual appearance. Examples include <em> (for emphasis) and <strong> (for important content).
- Physical Tags: These tags directly impact the visual appearance of the text. They alter font styles, sizes, and other visual properties. Examples include <b> (for bold) and <i> (for italic).
Table of Content
- HTML Formatting Elements
- Making text Bold or Strong
- Making text Italic or emphasize
- Highlighting a Text
- Making a text as Subscript or Superscript
- Making text smaller
- Striking through the text
- Adding a Text
- Supported Browsers