- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML Text Formatting
The HTML Text Formatting refers to the HTML elements that are designed specially for formatting content in an HTML document.
Syntax
Following is the syntax −
<tagname>content</tagname>
Following are the text formatting tags in HTML:
Sr.No. | Tag & Explanation |
---|---|
1 | <b> It specifies bold text in an HTML document. |
2 | <em> It specifies emphasized text in an HTML document |
3 | <i> It specifies italic text in an HTML document. |
4 | <small> It specifies smaller text in an HTML document. |
5 | <strong> It specifies important text in an HTML document. |
6 | <sub> It specifies subscripted text in an HTML document. |
7 | <sup> It specifies superscripted text in an HTML document |
8 | <ins> It specifies inserted text in an HTML document. |
9 | <del> It specifies deleted text in an HTML document. |
10 | <mark> It specifies highlighted text in an HTML document. |
Let us see an example of HTML Text Formatting:
Example
<!DOCTYPE html> <html> <style> body { color: #000; height: 100vh; background-color: #8BC6EC; background-image: linear-gradient(135deg, #8BC6EC 0%, #9599E2 100%); text-align: center; } </style> <body> <h1>HTML Text Formatting Demo</h1> <b>I'm Bold Tag</b> <br> <em>I'm Em Tag</em> <br> <i>I'm I Tag</i> <br> <small>I'm Small Tag</small> <br> <strong>I'm Strong Tag</strong> <br> <sub>I'm Sub Tag</sub> <br> <sup>I'm Sup Tag</sup> <br> <ins>I'm Ins Tag</ins> <br> <del>I'm Del Tag</del> <br> <mark>I'm Mark Tag</mark> <br> </body> </html>
Output
- Related Articles
- Formatting Text Using CSS
- Formatting Text in CSS
- How to represent text that must be isolated from its surrounding for bidirectional text formatting in HTML?
- Explain HTML formatting in PowerShell?
- How to use Emphasized formatting in HTML?
- How to use small formatting in HTML?
- Control the flow and formatting of text with CSS
- Formatting text to add new lines in JavaScript and form like a table?
- How to use the tag for keyboard input formatting in HTML?
- How do we do variable formatting using the tag in HTML?
- How do we do computer output formatting using the tag in HTML?
- Create small text in HTML
- Create strong text in HTML
- Display strikethrough text in HTML
- Create superscripted text in HTML

Advertisements