Heading tags:

The heading Tags in HTML are use when you want to define something important. There are six diffrent Heading Tags it goes from <h1> and <h6>

<h1> tag is the tag which makes the text the largest of all the heading tags because it defines the most important heading while the <h6> tag is the smallest of all headings and it is the least important heading

Try this yourself, by writing the code below and running it


Code:



<html>
<body>
<h1>Heading</h1>
<h2>Heading</h2>
<h3>Heading</h3>
<h4>Heading</h4>
<h5>Heading</h5>
<h6>Heading</h6>


</body>
</html>

Result:

Heading

Heading

Heading

Heading

Heading
Heading





Paragraph Tags:

We can type paragraphs using the <p></p> tags. It makes the content way better and more clean


Code:



<html>
<body>
<p>This is a Paragraph</p>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Necessitatibus perferendis tempora, laudantium possimus ab beatae fugit illum fugiat ad sunt quidem aliquam, dignissimos ducimus saepe enim explicabo tempore rem amet.</p>


</body>
</html>

Result:

This is a Paragraph


Lorem ipsum dolor sit amet consectetur adipisicing elit. Necessitatibus perferendis tempora, laudantium possimus ab beatae fugit illum fugiat ad sunt quidem aliquam, dignissimos ducimus saepe enim explicabo tempore rem amet.






Anchor Tags:

Before we discuss what an anchor that is, let me give you an example of where you have used it. If we go and Google search lets say we search "Youtube". When we search that we get some a Youtube in purple colour , when we click on that text it takes us to the youtube website. These purple text are called "links". And to create these links on our website we use the <a></a> tags, also knows as anchor tags


In editors like Visual Studio Code and Sublime Text, when we use anchor tags the text editor by default gives this tag <a href=""></a>
If you are using Notepad in Windows or in Mac or Ubuntu(Linux), you will need to add that href="" after the anchor tag


The reason why we need this href="" is because that is how we get redirected to a page. So what we do is we type <a href=""></a> and then inside the href="" we put the link in where it should redirect us.

So in this case it is youtube we do <a href="https://www.youtube.com/">Click me to go to YouTube</a>

When we click on the text called "Click on me to go to youtube", HTML looks at what link is in the href and it redirects us to that link




Code:



<html>
<body>
<a href="https://www.youtube.com/">
Click me to go to Youtube<
/a>


</body>
</html>




br or break tag:

A <br> tag also known as a break or empty tag, is tag used to break lines or seperate elements from each other. You will notice that there is not closing tag to for the break tag(</br>) element.


Code:


Without break tags:

<html>
<body>
<h1>Hi!
<h1>Hi again!


</body>
</html>

With Break Tags:

<html>
<body>
<p>Hi!</p>
<
br><br><br>
<p>Hi again!</p>


</body>
</html>

Result:

Without break tags:

Hi!

Hi again!




With break tags:



Hi!




Hi again!






So the more break tags you give the more space is there between lines. if there is a sentence and you want half the sentence to go to the next line, use these break tags.


Wihout break tags:
Lorem ipsum dolor sit amet consectetur adipisicing elit. Laudantium quisquam.


With break tags:
Lorem ipsum dolor sit amet consectetur
adipisicing elit. Laudantium quisquam.