HTML ATTRIBUTES W/ ANCHOR TAGS

LINKS & ANCHOR TAGS

We're going to learn how to create links to other pages using anchor tags.

The anchor tag <a> allows us to move around on the web. You can use anchor tags to jump around on a web page, a website, to link to files on your computer, and to create links to other websites.

HTML Attributes

All HTML elements can have attributes. Attributes provide additional information about an element. Attributes are always specified in the opening tag. Attributes usually come in name/value pairs like: name="value".

Anchor tags have an href attribute. This tells the browser where the link lives on the internet.

Think of the href attribute like the “To:” section on an envelope. The value of this attribute explains where to go, just like an address.

< IMG > TAG & SRC ATTRIBUTE

An <img> tag lets you put an image on your website. Image tags have a source attribute (src) that tells the browser where the image lives on the internet.

DIFFERENCE BETWEEN ANCHOR TAGS & IMG TAGS

There are three key differences between the image tag and anchor tag. The image tag...