Lecture

HTML a Tag

In HTML, the <a> tag is used to create links that, when clicked, redirect to another webpage or scroll to a specific section of the current page.

The <a> tag is used in the following way:

Using the a Tag
<a href="URL">Link text or image</a>

The <a> tag wraps around text or an image, and clicking on this text or image directs the user to the address specified in the href attribute.

For example, the following HTML code creates a link labeled as "Go to Google":

a Tag Example
<a href="https://www.google.com">Go to Google</a>

When this code is added to a webpage, the text "Go to Google" will be displayed, and clicking this text will open the Google website in the web browser.

Lecture

AI Tutor

Design

Upload

Notes

Favorites

Help