-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNavs.html
45 lines (40 loc) · 1.86 KB
/
Navs.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!-- Navs in Html-->
<!-- In Html, the `<nav>` tag is used to create a navigation section on a web page.
This tag is used to group navigation links and provide a semantic reference point
which indicates that the content within the `<nav>` element is related to site navigation.
Next, I show you how to use the `<nav>` tag. -->
<!DOCTYPE html>
<html>
<head>
<title>Html navigation example</title>
</head>
<body>
<header>
<h1>Name of your Site</h1>
</header>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/about">About</a></li>
<li><a href="/services">Services</a></li>
<li><a href="/contact">Contact</a></li>
</ul>
</nav>
<main>
<!-- Main content of your page -->
</main>
<footer>
<p>© 2023 Your Company - All rights reserved.</p>
</footer>
</body>
</html>
<!-- In this example, a basic web page structure has been created with a navigation section.
Here are some key considerations. -->
- The `<nav>` element is located within the body of the page and contains an unordered list (`<ul>`) of navigation links (`<a>`).
- Links point to different sections of the website, such as "Home," "About," "Services," and "Contact."
- The `<header>` tag is used for the main header of the page, which may contain the site name or logo.
- The `<main>` element represents the main content of the web page, which is independent of the navigation section.
<!-- Using the `<nav>` tag in this way provides a semantic structure that makes it easier to
accessibility and understanding of content by search engines and users. Besides,
you can style the navigation section using Css to fit the design of your site
Web. -->