?
What is the correct HTML for creating a hyperlink ?
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>
Answer & Solution
Correct Answer:
Option
D
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.
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
Login to post a comment or share your explanation.
Login