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>
<!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>
</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>
</section>
Code:
<!DOCTYPE html>
<html>
<head>
<title>My Website </title>
</head>
<body>
<section>
<h1> Paragraph 1 </h1>
</section>
</body>
</html>
Output:
Code:(for section nesting)
<!DOCTYPE html>
<html>
<head>
<title>My Website </title>
</head>
<body>
<section>
</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:
Keep publishing
ReplyDelete