HTML and CSS Certification Practice Test 2025 - Free HTML and CSS Practice Questions and Study Guide

Question: 1 / 400

What is the correct syntax for creating a link in HTML?

<a href="http://www.example.com">Link</a>

The correct syntax for creating a link in HTML is represented by the use of the anchor tag `<a>`. This tag is specifically designed to define hyperlinks, which allow users to navigate from one page to another. In this case, the `href` attribute specifies the URL that the link points to.

So, `<a href="http://www.example.com">Link</a>` is correct because:

- The `<a>` tag is the proper tag for hyperlinks.

- The `href` attribute is used to indicate the destination URL, which is essential for making the link functional.

- The text "Link" between the opening and closing anchor tags is what users see on the webpage and can click on.

Other choices do not follow the correct HTML syntax for links. For example, the `<link>` tag is used in the head element to link to external resources like stylesheets, not for creating hyperlinks in the body of an HTML document. Similarly, `<url>` is not a valid HTML tag and does not exist within the HTML specification. Lastly, using `url` as an attribute on the `<a>` tag does not conform to standard HTML practices, as `href` is the attribute intended for providing the link's URL.

Get further explanation with Examzify DeepDiveBeta

<link href="http://www.example.com">Link</link>

<url href="http://www.example.com">Link</url>

<a url="http://www.example.com">Link</a>

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy