HTML Lesson 4: Text


Introduction to HTML Text

HTML Text is the most important section of a web page but very simple to understand. Attractive and engaging text makes a website successful. Text engages the reader as well as helps Search Engine Optimization through keywords and meta data. In this lesson we will explain you what are the best ways to operate with the text in HTML. It is not a good practice to just put a text in HTML because there are several tags for it and you have to use it. You will write your text inside those tags.

So let’s get started and give you basic understanding of managing text in HTML with help of several tags. But first have a look at a demonstration of text without using any tag


Usually, it’s not the best approach to put plain text in HTML code. The best practice is to define text in a Paragraph tag (<p>). Because you cannot apply CSS to it; hence, you can not achieve your design objective. A Paragraph tag should be used for text. Usually, a paragraph contains more than a few lines particularly in the form of a block of text. It helps to organize the text more conveniently. Here’s the demonstration of it:

Source Code Output

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor…

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu…


Heading tags are best used for heading and subheadings. These tags are 6 in number and they change text depending upon the number you choose.

Source Code Output

Heading One

Heading Two

Heading Three

Heading Four

Heading Five
Heading Six


  • Text is the most important part of a web page.
  • Text supports Search Engine results
  • The paragraph tag can manage blocks of text easily.

Next Lesson

In the next lesson we will learn how to format the text in HTML. Let’s get started HTML Formatting lesson


  1. […] got some basic knowledge of the HTML Attributes. Now let’s move to our next lesson which is HTML Text. Where you will learn to manage the text with different HTML […]

  2. […] have learned in detail about how to add text in HTML Text Lesson. However, in that lesson we haven’t taught you about styling them. In this lesson you […]

Leave a Reply