Guided Notes

Links & Images

Attributes, anchors and href, absolute vs relative paths, images and alt text, and figures.

Attributes

Slide 1 / 5

Attributes add information to an element. They go in the opening tag as name="value" pairs, separated by spaces:

<a href="about.html" title="About us">About</a>

Some attributes work on any element: β€’ id β€” a unique name for one element on the page. β€’ class β€” a label shared by elements, used by CSS and JavaScript. β€’ title β€” extra advisory text, shown as a tooltip. β€’ lang β€” the language of the content.

Others belong to specific elements, like href on links and src on images.

← Lists & Navigation