Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

html
tags
communitycreator

How to format your HTML text using special tags

abdulbasit kabir

Introduction

HTML is a markup language used to develop a web page’s structure. With HTML, we can structure a whole website, design it, and make it ready to deploy.

In this shot, we’ll see what formatting is and how we can efficiently format HTML texts and make HTML pages look good without using CSS.

HTML formatting

HTML formatting has various methods or tags, inline or block, that are used to enhance visual context and visual attraction.

This text formatting is done using predefined HTML tags and semantics.

These tags add various meanings to the text.

HTML formatting elements

HTML has many elements that are used for formatting. Some of those are:

  1. <b>: The bold tag is an inline element that is used to bold a text in HTML. The text to be bolded is typed in between the start tag of the bold tag and the end tag.
<p> This is a paragraph and this text <b>is bold</b> </p>
  1. <strong>: Just like the bold tag, this tag gives the bold attribute but the difference is that , it adds the importance attribute to the semantic of the text. The text draws the keyboard’s attention when navigating with the keyboard. The text is put in between the start and end tag as used in bold text. It is also an inline tag.

<p> This is a paragraph and <strong>this text is important</strong> </p>

  1. <i>: This is an element that is used to change an element font to italics. It has start and end tags and the text is typed between them.

<p> This is a paragraph and <i> this text is in italics</i></p>

  1. <em>: This is a tag that is used for emphasis. The text is typed in between to change the text.

<p> This is a paragraph and <em> this text is an emphasized text</em></p>

  1. <mark>: This element is used to mark a text or highlight it.

<p> This is a paragraph and <mark> this text is marked</mark></p>

  1. <small>: It is used to get smaller text.

<p> This is a paragraph and this text is <small> small </small></p>

  1. <del>: It is used to identify deleted text or irrelevant text.

<p> This is a paragraph and this text is <del> deleted </del></p>

  1. <ins>: This tag defines inserted text in a document.

<p>This is a paragraph and this text is <ins>inserted</ins></p>

  1. <sub>: This defines subscript text.

<p> This is a paragraph and this text is a <sub>subscript</sub></p>

  1. <sup>: This defines superscript text.

<p> This is a paragraph and this text is a <sup>superscript</sup> </p>



You change the styles in the HTML tab and see the updated text in the output tab below:

Conclusion

Using HTML efficiently is very important while coding. Make sure you study these tags and practice for better understanding.

RELATED TAGS

html
tags
communitycreator
RELATED COURSES

View all Courses

Keep Exploring