What is the correct HTML for creating a hyperlink ?
1. <a>http://www.examveda.com</a>
2. <a name=”http://www.examveda.com”> examveda.com</a>
3. <a url=”http://www.examveda.com> examveda.com</a>
4. <a href=http://www.examveda.com> examveda.com</a>
A. Option 1
B. Option 2
C. Option 3
D. Option 4
Answer: Option D
Solution (By Examveda Team)
The correct HTML code for creating a hyperlink uses the tag with the href attribute to specify the link destination.Option 1: <a>http://www.examveda.com</a> - This is incorrect. The href attribute is missing, and the link text should be inside the tags.
Option 2: <a name=”http://www.examveda.com”> examveda.com</a> - This is incorrect. The name attribute is not used for hyperlinks.
Option 3: <a url=”http://www.examveda.com> examveda.com</a> - This is incorrect. The url attribute is not valid for hyperlinks.
Option 4: <a href=http://www.examveda.com> examveda.com</a> - This is the correct answer. The href attribute specifies the URL of the page the link goes to.
Join The Discussion