Given below are several usages of the anchor tag in HTML. (A) <A…

2018

Given below are several usages of the anchor tag in HTML. (A) <A href="http://w3c.org/test/html">Test</A> (B) <A href="/HTML/test.html">Test</A> (C) <A href="test.html">Test</A> (D) <A href="test.html#top">Test</A> Which of the above are valid?

Answer: D. (A), (B), (C) and (D)The <a> tag (anchor tag) in HTML is used to create a hyperlink on a webpage. This hyperlink can link to another webpage or to a specific section of the same…

  1. A.

    (A) and (B) only

  2. B.

    (A), (B) and (C) only

  3. C.

    (B), (C) and (D) only

  4. D.

    (A), (B), (C) and (D)

Attempted by 611 students.

Show answer & explanation

Correct answer: D

The <a> tag (anchor tag) in HTML is used to create a hyperlink on a webpage. This hyperlink can link to another webpage or to a specific section of the same webpage. The href attribute can contain either an absolute URL or a relative URL. Syntax: <a href="link">Link Name</a> Therefore, all the given anchor tag usages are valid.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Uppsc Polytechnic Lecturer 2025 Cs

Loading lesson…