Main content
Unlisted resources area
Course: Unlisted resources area > Unit 2
Lesson 2: Webpage documentation- HTML: The h1 to h6 tags
- HTML: The p tag
- HTML: The br tag
- HTML: The ul, ol, and li tags
- HTML: The strong and em tags
- HTML: The a tag
- HTML: The image tag
- HTML: The table tags
- CSS: The element selector
- CSS: The descendant selector
- CSS: The class selector
- CSS: The id selector
- CSS: The color property
- CSS: The background-color property
- CSS: The font-family property
- CSS: The font-size property
© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice
HTML: The a tag
The
<a>
tag is used both for linking to other websites and for linking to parts of the current webpage. It has one required attribute:href
: Where the browser should navigate to. If it should go to a new page, then this should be a URL starting with "http://" or "https://". If it should jump inside the current page, then it should start with a "#" and then match the id attribute of the tag to jump to (like "#main").
The a tag should contain whatever the browser should make clickable. That's often text, but it could also be an image or any collection of tags.