Can I Use Anchor Without Href? | Placeholder Hyperlink - Code
Có thể bạn quan tâm
In HTML5, using an aanchor element without an href attribute is valid. It is considered to be a “placeholder hyperlink.” You can use class and other attributes, but you can not use target, download, rel, hreflang, and type.
Example:
<a>previous</a>If you have to use href for backwards compability, you can also use (do-nothing link)
<a href="javascript:void(0)">link</a>Read more: A href JavaScript void 0
Example anchor without href
HTML <a> tag example – html anchor no href:-
<html> <body> <a>previous</a> </body> </html>Output:

Do comment if you have any doubts and suggestions on this HTML topic.
Note: The All HTML Examples codes are tested on the Firefox browser and the Chrome browser.
OS: Windows 10
Code: HTML 5 Version
Share this:
- More
- X
- Tumblr
- Telegram
Related
Từ khóa » Html5 A Tag Without Href
-
Valid To Use (anchor Tag) Without Href Attribute? - Stack Overflow
-
Is It Bad To Use Without Href? | Sololearn: Learn To Code For FREE!
-
A Link Without Href Code Example
-
: The Anchor Element - HTML: HyperText Markup Language | MDN
-
Anchors Without Href - Accessibility - SitePoint Forums
-
Valid To Use (anchor Tag) Without Href Attribute? - Newbedev
-
How To Style An Anchor Tag With No Href Attribute? - Misc
-
Is An Anchor Tag Without The Href Attribute Safe? - CopyProgramming
-
Anchor Tag Without HREF Attribute - CodePen
-
HTML A Tag - W3Schools
-
Back To Basics: Non-Navigating Links For JavaScript Handling
-
HTML5 Navigation: How To Use Anchor Tags For Hypertext
-
Link Behavior - IT Accessibility - NC State University
-
A Tags Without Href Generate A Navigation Event #34 - GitHub