Skip to main content

Command Palette

Search for a command to run...

HTML Tags

Updated
2 min readView as Markdown
S

I am learning frontend development along with data structure .

HTML tags are used to structure a web page and to let the web browser render the page properly.

We will talk about the basic HTML tags which are mostly used .

Basic Tags

  • <h1> to <h6> :- h1 to h6 are known as heading tags . These tags are used to put headings on the page . Mostly recommended to use heading tags in increasing order . for eg:

<h1>Heading Tag</h1>
<h2>Heading Tag</h2>
<h3>Heading Tag</h3>
<h4>Heading Tag</h4>
<h5>Heading Tag</h5>
<h6>Heading Tag</h6>
  • <p> :- Paragraph tag is used to write the main content of the page.

for eg.

<p> This is a paragraph tag </p>
  • <br> :- Break line tag used to break a line.

for eg.

<p>This is a paragraph tag with <br> break line tag .</p>
  • <pre> :- Preformatted text tag used when we want to write poem like content.

Formatting Tags

  • <b> & <strong> :- Bold and strong tag , both shows the same result , content in bold but the main difference is that web browser consider strong as in important and bold as in simple bold text and render according to that.
  • <i> & <em> :- Italic and emphasis tag , shows the content in italic and the difference between these are the same as above mentioned.
  • <small> :- small tag defines smaller text (like copyright and other side-comments).

  • <sub> & <sup> :- Subscript and superscript . Subscript text appears half a character below the normal line .where as superscript text appears half a character above the normal line .

  • <ins>:- Insert tag defines a text that has been inserted into a document and browser usually underline that part .
  • <mark> :- The Mark tag in HTML element represents text which is marked or highlighted.

  • <del> :- Delete tag in HTML element represents a range of text that has been deleted from a document . This can be used when rendering "track changes" or source code diff information.