Skip to main content
  1. Web Development Course/
  2. Introduction to HTML/

Formatting text in HTML

Alejandro AO
Author
Alejandro AO
I’m a software engineer building AI applications. I publish weekly video tutorials where I show you how to build real-world projects. Feel free to visit my YouTube channel or Discord and join the community.
Introduction to HTML - This article is part of a series.
Part 6: This Article

When creating a web page, it’s important to structure the text in a way that is easy to read and understand. HTML provides a variety of tags that can be used to structure text on a web page.

Using HTML Tags to Structure Text
#

HTML tags can be used to structure text on a web page, including headings, paragraphs, and lists. By using these tags, you can create a well-organized and easy-to-read web page.

Headings
#

Headings are used to divide the content of a web page into sections. There are six levels of headings, ranging from <h1> (the largest) to <h6> (the smallest). Headings are used to indicate the importance of each section of the web page, with <h1> being the most important and <h6> being the least important.

<h1>This is a level 1 heading</h1>
<h2>This is a level 2 heading</h2>
<h3>This is a level 3 heading</h3>

Paragraphs
#

Paragraphs are used to group related text together. They are created using the

tag. Paragraphs are an important part of the structure of a web page, as they help to break up long blocks of text and make the content easier to read.

<p>This is a paragraph of text.</p>
<p>This is another paragraph of text.</p>

Formatting Text in HTML
#

HTML also provides a variety of tags that can be used to format text on a web page. Some of the most common formatting tags are:

  • <em>: Emphasizes text by italicizing it.
  • <strong>: Emphasizes text by bolding it.
  • <u>: Underlines text.

SEO
#

Semantic HTML also helps to improve the SEO (Search Engine Optimization) of a web page by providing meaningful structure to the content. Search engines use HTML tags to understand the content of a web page and to rank it in search results. By using semantic HTML tags, you can help search engines to better understand the content of your web page.

Conclusion
#

In this lesson, we learned how to use HTML tags to structure text on a web page. Maybe you can start to practice on your own and create a web page with several paragraphs about a topic you like? In the next section, we will take a look at HTML lists. See you there!

Introduction to HTML - This article is part of a series.
Part 6: This Article