HTML element: a
Example
Syntax
1 | <a href="https://tutsplus.com">Envato Tuts+</a> |
Result
Link to sections
Anchors can also link to sections on the same page using fragment identifiers. It takes the form of a # symbol that after the id from an element elsewhere on the page:
1 | <a href="#somewhere">Jump somewhere else</a> |
2 |
|
3 |
|
4 |
|
5 | <h2 id="somewhere">This is somewhere else!</h2> |
For example, here is a link to jump to the Learn More section below!
You can use #top or simply # to link directly to the top of the current page.
Browser support
The <a> tag is supported in all modern browsers. Read more at caniuse.com.
Characteristics
The <a> tag support Global attributes in HTML. Global attributes are common to all HTML elements and can be used on all of them (although they may not have much of an effect on some of them).
- If the <a> element has a href attribute, then it represents a hyperlink marked by its content.
- If the <a> element has no href attribute, then the element represents a placeholder for where a link could otherwise be placed.
The href attribute
The <a> element supports the following properties which can only be present if the href feature is present:
Contents
An <a> allow element transparent content, but there must be no interactive content descendant, <a> element descendant, or descendant with the tabindex attribute specified.
...
source: https://news.oneseocompany.com/2023/03/16/html-element-a_2023031642101.html
Your content is great. However, if any of the content contained herein violates any rights of yours, including those of copyright, please contact us immediately by e-mail at media[@]kissrpr.com.