Set anchor in HTML - provide structure
When building your own website, it can be helpful if you not only highlight the sections textually and visually, but also set an anchor in the HTML code. We'll show you how to set an anchor to provide structure.
How to set an anchor in HTML
An anchor represents the starting and ending point of a hyperlink, which can serve as a reference for users.- As soon as you start a new section of text, you should set an anchor. For this purpose, the heading is very suitable.
- Set an anchor with the command <h*>id=''anchor name''>heading</h*>. Replace the * with the appropriate number.
- By marking <h*> you specify which heading this anchor is.
- For the anchor name, insert the name that you have selected for it. Ideally, use the heading you want for this section of text for this.
- If you have an older version of HTML, you will need to use the command <h*><a name=''anchor name''>heading</a></h*>.
- Fill out the formula as previously described.