i

Learn HTML and CSS in 10 Days

Using Text Based Element

There is a different element in HTML to display a text on a website. In this context, we are going to pay attention to some of the most important ones, i.e. headings, paragraphs, bold and italics text.

Headings

Headings are categorized in block-level elements and can be used in 6 different ranks i.e. from The main function of heading is to establish hierarchy and to break up content on a web page. They are key identifiers for clients perusing a web page. Additionally, they also assist the search engines in determining and indexing the content on a website.

It is advised to use heading in an order inside the website. The most important heading of a web page should be given a

element and likewise the others should be used.

Use headings at places wherever it is required. Do not use them if you want to bold your text or want to make them bigger.

Let’s use these heading elements in an example.

Output:

Paragraphs

Headings are succeeded by supporting paragraphs. element helps in defining a paragraph in HTML. Paragraph is a block-level element that appears in a steady progression (one after the other), adding data to a page as wanted. Let’s check an example of paragraphs. Example -

HTML and CSS is a very amazing language. I love to code in it

HTML stands for Hyper Text Markup Language and CSS stands for Cascading Style Sheets

Output:

HTML and CSS is a very amazing language. I love to code in it HTML stands for Hyper Text Markup Language, and CSS stands for Cascading Style Sheets

Bold Text using Strong

Suppose you want the text that you have used in your webpage to look bold. Along with that you also want to give strong importance to it. For these things, we use the  element. To bold, the text one can use  as well as  element, but we need to get accustomed with their semantic difference.

lThe  element semantically refers to stylistically offset content, which isn't generally the best decision. On the other hand, the element semantically refers to offer strong importance to the text.

Let’s check up an example of both the elements.

Italicize Text using Emphasis

If you want to italicize the text and also give emphasis to it, then you can go with the element. In HTML, there are two ways by which you can italicize the text. On is by using element and the other one is by using element. 

The element is used to place text in an alternate way (tone or voice) if kept inside quotation marks. On the other hand, the element helps to emphasize text.

These elements are very much helpful for giving life to our web page content. We have also got structurally based elements in HTML. Structural elements help in groping of content based on headers, footers, articles etc. So let's start with them