Information Communication Technology ICT – 21 Website authoring | e-Consult
21 Website authoring (1 questions)
Login to see all questions.
Click on a question to view the answer
To create a bookmark (also known as an anchor link) that links to a specific section of a webpage identified by an id attribute, the tag is used. The href attribute of the tag should contain the id of the target element, prefixed with a '#'.
Example:
<h2> <a href="#section2">Jump to Section 2</a> </h2>
<h2 id="section2">Section 2 Content</h2>
Explanation:
- id attribute: The id attribute is used to uniquely identify an HTML element within a document. Each id should be unique.
- tag: The
tag creates a hyperlink. - href attribute: The
hrefattribute specifies the destination of the hyperlink. When the id of the target element is prefixed with a '#', the browser will scroll to that element when the link is clicked.