{ A destination to learn coding }

Structual Tags

Heading Tag

Heading tags are used to display headings in a webpage. There are 6 different heading tags depending on their sizes. H1 being the largest size and h6 the smallest.

<h1> </h1> 
<h2> </h2>
<h3> </h3>
<h4> </h4>
<h5> </h5>
<h6> </h6>
<html>
<head>
	<title> Heading Tags- Structural Tags </title> 
</head> 

<body>
	<h1>Learn with Letzcode</h1>
	<h2>Learn with Letzcode</h2>
	<h3>Learn with Letzcode</h3>
	<h4>Learn with Letzcode</h4>
	<h5>Learn with Letzcode</h5>
	<h6>Learn with Letzcode</h6>
</body>
</html>
See Output

The heading tag also defines the importance of the heading.

<h1> </h1>
tag is used for the heading with more importance and
<h6> </h6>
for the heading with least importance. For example, in this page, the heading Stuctural Tags is written between h1 tags whereas heading Heading Tag is written between h3 tags.


Heading tags can also be used to define the relation between the headings in a webpage.

<html>
<head>
	<title> Heading Tags- Structural Tags </title> 
</head> 

<body>
   <h1>Maruti Suzuki</h1>
	  <h2>Vitara Brezza</h2>
	  <h2>Alto</h2>
	    <h4>Alto 800 </h4>
	    <h4>Alto K10 </h4>
	  <h2>Dzire</h2>
	
   <h1>Tata</h1>
	  <h2>Tigor</h2>
	  <h2>Tiago</h2>
</body>
</html>
See Output

In the above script, Maruti Suzuki and Tata are two different headings and are represented using h1 tags. Few of the Suzuki and Tata cars are listed below the main heading by using h2 tags. This tells the browser that the headings having h2 tags are sub headings under the main heading. Similarly, the models Alto 800 and Alto K10 are listed below the heading Alto by using h4 tags. This tells the browser that Alto K10 and Alto 800 are under Alto.


Using Heading with paragraphs
<html>
<head>
	<title> Heading with Paragraphs </title> 
</head> 

<body>

<h1>Adversity creates resilience</h1>
<p>
Nothing in life breeds resilience like adversity and failure.
A study in Time magazine in the mid-1980s described the incredible
resilience of a group of people who had lost their jobs three times
because of plants closings. Psychologists expected them to be
discouraged, but they were surprisingly optimistic.
Their adversity had actually created an advantage.

</p> <h2>Adversity creates resilience</h2> <p>
Nothing in life breeds resilience like adversity and failure.
A study in Time magazine in the mid-1980s described the incredible
resilience of a group of people who had lost their jobs three times
because of plants closings. Psychologists expected them to be
discouraged, but they were surprisingly optimistic.
Their adversity had actually created an advantage.

</p> <h3>Adversity creates resilience</h3> <p>
Nothing in life breeds resilience like adversity and failure.
A study in Time magazine in the mid-1980s described the incredible
resilience of a group of people who had lost their jobs three times
because of plants closings. Psychologists expected them to be
discouraged, but they were surprisingly optimistic.
Their adversity had actually created an advantage.

</p> </body> </html>
See Output
learn css