Each .nav-link element should link to a corresponding element on the landing page (has an href with a value of another element’s id. e.g. #footer ) what does it mean
Here is some information on this topic:
Note: The hash tag represents Id.
The .nav-link element in HTML serves as a navigation link within a web page. Let’s break down what it means:
Definition and Purpose:
The <nav> tag defines a set of navigation links. It is intended for major blocks of navigation within a webpage.
Not all links need to be inside a <nav> element; it is primarily used for sections that consist of significant navigation blocks.
Browsers, including screen readers for disabled users, can use this element to determine whether to omit the initial rendering of navigation content.
Common examples of navigation sections are menus, tables of contents, and indexes.
Usage Example:
Suppose you have a navigation menu with links to different sections of your website (e.g., Home, About, Services, Contact). You can structure these links within a <nav> element like this:
In this example, each .nav-link (represented by the <a> tags) points to a corresponding element on the landing page using the href attribute with the value of another element’s ID (e.g., #footer).
Accessibility and Semantics:
Properly using the <nav> tag enhances website accessibility by aiding screen reading software in identifying primary navigation areas.
In summary, the .nav-link elements should be structured within a <nav> tag to create a clear and accessible navigation system on your webpage.
sorry sir i am not getting the point of this text i mean that i have give same values of href and the text why didn’t it pass the code example:i have given the href id values about us in the same way i should give the text or not to give i didn’t get your point can u explain me in more detail with an example