What is the correct HTML for creating a hyperlink?
2022
What is the correct HTML for creating a hyperlink?
- A.
<a name= : ""> A </a>
- B.
<a> B </a>
- C.
<a href="http://www.example.com">example</a>
- D.
<a url="http://www.example.com">example</a>
Attempted by 294 students.
Show answer & explanation
Correct answer: C
A hyperlink in HTML is created using the <a> (anchor) tag with the href (Hypertext Reference) attribute, which defines the destination URL.
Without href, the anchor does not function as a link, making href essential for hyperlink creation.