Question from a complete novice about HTML | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Question from a complete novice about HTML

How come when you use an anchor for Hyperlinks, itā€™s written as <a and not <a> like every other tag Iā€™ve encountered so far?

9th Sep 2023, 10:16 AM
Stephen
3 Answers
+ 3
Stephen Both are same <a href = " "> Opening and closing tag will be used for anchor with hyperlink.
9th Sep 2023, 11:26 AM
RšŸ’ šŸ‡®šŸ‡³
RšŸ’ šŸ‡®šŸ‡³ - avatar
+ 5
You will learn more about this in the course. But for now. href is an attribute of the <a> tag. It specifies the URL (web address) that the hyperlink points to. For example: <a href="https://www.sololearn.com">Sololearn</a> This creates a clickable link. However if you only do this. Example: <a>Sololearn</a> You will get a word but it will not be clickable.
9th Sep 2023, 8:56 PM
Chris Coder
Chris Coder - avatar
+ 2
Thank you, i didnt realise the whole href was inside the first tag, its not explained why in the super basics
9th Sep 2023, 12:44 PM
Stephen