Learn Text Formatting in HTML

Learn Text Formatting in HTML

Learn HTML Text formatting and various tags for HTML formatting - HTML Headings, Strong, Bold, underline, superscript and subscript, Italicized, definition, grouping etc.

HTML Formatting basically refers to the enhancing of text in order to increase the visual appeal. HTML provides a range of formatting tags that can be used to make the text attractive to the users. There are many options available that can be used for formatting, just like any other text editor.

HTML Formatting tags

HTML Formatting Tags

There are two types of HTML tags:

  • Physical tags- These tags provide a visual appeal to the document. For example, bold, italic, underlined, etc.
  • Logical tags- These tags provide a logical meaning to the text. For example, the tag.

Formatting Text in HTML

Now, we shall discuss some of the major formatting text in HTML.

1. HTML Headings

HTML headings range from 1 to 6. The heading defined within 

 is the more important i.e. larger font-size and font-weight whereas 

 is the least important i.e. least font-size. These headings can be judiciously used to format the text.

 <html> 
<head> 
<title>DataFlair</title> 
</head> 
<body> 
<h1>DataFlair Heading 1</h1>
<h2>DataFlair Heading 2</h2>
<h3>DataFlair Heading 3</h3>
<h4>DataFlair Heading 4</h4>
<h5>DataFlair Heading 5</h5>
<h6>DataFlair Heading 6</h6>
</body> 
</html> 

Output:

html heading tag

2. HTML Bold text

This is defined by the  tag. This is a physical tag which is used to display the text in Bold. For example,

 <!DOCTYPE html>
<html>
<head>
<title>DataFlair</title>
</head> 
<body>
<p><b>Welcome to DataFlair!</b></p>
</body>    
</html>

Output:

html strong tag

3. HTML Strong Element

It displays the content in a manner such that it appears as important.

  <!DOCTYPE html>
<html>
<head>
<title>DataFlair</title>
</head> 
<body>
<p><strong>Welcome to DataFlair!</strong></p>
</body>    
</html>

Output:

html bold tag

html tutorials html formatting html

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Know Everything About HTML With HTML Experts

HTML Assignment Help Australia @30% OFF from Sample Assignment, with Our Best HTML assignment help experts. Get HTML homework help online at affordable price. 100% Plag free assignment solution.

Commonly Used HTML Tags with Examples

HTML tags are keywords used in HTML to display web-pages with certain properties. They are further used for defining HTML elements. An HTML element consists of a starting tag.

HTML Introduction - HTML Tutorial For Beginners - DataFlair

HTML Introduction - Learn what is HTML, History of HTML, its benefits and limitations, HTML applications, HTML5 and its features, what's new in HTML5.

HTML Basics to Learn HTML for Web Development

HTML is the mark-up language most websites are written in. In this article, we will delve into the most basics of HTML like tags and elements that are of utmost importance while writing any code in HTML. These tags help in the structuring and display of content on the web pages.

All You Need To Know About HTML Forms

This article provides an introduction to styling forms with CSS, including all the basics you might need to know for basic styling tasks.