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.
If you have to use href for backwards compability, you can also use (do-nothing link)
Example anchor without href
HTML <a> tag example – html anchor no href:-
<html> <body> <a>previous</a> </body> </html>
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