Level no.20

 Header Tag in HTML

Header tag is used for introduction of your content and define top section of your web-page or for  navigational links, logos, icons and images. A header tag can nest in another header tag.

Syntax:

<header>

data should be here.

</header>.

Code:

<!DOCTYPE html>

<html>

<head>

<title>My Website </title>

</head>

<body>

<header>

<h1> My Website </h2>

<p>This is the header of  your web-page</p>

</header>

</body>

</html>


Output:







Navigation Tag in HTML

Navigation tag <nav> is used to define section of web-page than contain navigational links.Links of web-page are in the navigation tag but not all the links are inside  the navigation tag. Structuring the content of the web-page and determine that the enclosed links are part of the navigation tag.It is act like a container for putting links and logos.

Syntax:

<nav>

<ul>

<li> <a href="#"> Home </a></li>

<li> <a href="#">  About Us </a></li>

<li> <a href="#"> Contact Us </a></li>

</ul>
</nav>

Why we use # sign here?

It is used for not having links so, it creates a hyper link that refers is to a same document rather than creating an internal link .

Code:

<!DOCTYPE html>

<html>

<head>

<title>My Website </title>

</head>

<body>

<header>

<h1> My Website </h2>

<nav>

<ul type=" circle">

<li> <a href="#"> Home </a></li>

<li> <a href="#">  About Us </a></li>

<li> <a href="#"> Contact Us </a></li>

</ul>
</nav>

</header>

</body>

</html>

Output:








Section Tag in HTML

Section tag <section> is an semantic element in HTML, so it provides semantic meaning to your document. You can nest section tag into another section tag, It is easy for  readers to understand the out-line of your web-page.Nesting can make your document well-structured and styling can be easy for you.When you are nesting sections you are making small portion and this small portion is helpful when you are using CSS.

Syntax:

<section>

<h1> Paragraph 1 </h1>

   <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Mollitia a sed,
praesentium consectetur ullam laborum eos animi error earum incidunt.</p>

</section>

Code:

<!DOCTYPE html>

<html>

<head>

<title>My Website </title>

</head>

<body>

<section>

<h1> Paragraph 1 </h1>

   <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Mollitia a sed,
praesentium consectetur ullam laborum eos animi error earum incidunt.</p>

</section>

</body>

</html>


Output:




Code:(for section nesting)

<!DOCTYPE html>

<html>

<head>

<title>My Website </title>

</head>

<body>

<section>

        <h1>Paragraph 1</h1>
        <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Mollitia a sed, praesentium consectetur ullam laborum eos animi error earum incidunt.</p>
        <h2>Paragraph 2</h2>
        <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse in voluptate excepturi repudiandae, sed recusandae suscipit et velit expedita inventore minima omnis delectus eum deleniti accusamus sapiente, qui autem facilis!</p>
        <section>
            <h3>Paragraph 3</h3>
            <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quas, voluptatem neque. Natus sed numquam nam laborum expedita eum vitae commodi reiciendis nobis, cumque ex ducimus esse, fugit molestiae eos ab?</p>
            <h4>Paragraph 2</h4>
            <p> Lorem ipsum dolor sit amet consectetur adipisicing elit. Quia, quo eveniet architecto itaque aut fugit et cumque. Omnis, possimus architecto. </p>
     

</section>

</body>

</html>

Output:







Footer Tag in HTML

Footer tag <footer> is also an semantic element. It defines footer of HTML document. Footer tag also contain navigational links to add logos and link at the bottom of the web-page.Like other HTML tags, you can also nest footer tag. 

Code:

<!DOCTYPE html>

<html>

<head>

<title>My Website </title>

</head>

<body>

  <footer>

        <nav>

            <a href="#">Facebook</a>

            <a href="#">Instagram</a>

            <a href="#">youtube</a>

        </nav>


    </footer>   

</body>

</html>

Output:



Comments

Post a Comment

Popular posts from this blog

Level no.4

Level no.21

Level no.3