Summary
In the third lesson, we learned that:
- Attributes are written in the form of
name="value". - Hypertext links are created using the
aelement with thehrefattribute, whose value is the link we want to open. - Hypertext links can open a link in a new window by adding the
targetattribute with the value_blank. - Links can be either absolute, e.g.
https://www.wikipedia.org/, or relative, e.g../pes.html. - Relative links can start with
./, which looks for the file in the same folder as the referencing HTML document. - Relative links can also start with
/, which looks for the file in the project's root folder. - Images are added using the
imgtag with thesrcandaltattributes, where the value ofsrcis the image link and the value ofaltis the description for screen readers. - Videos are added using the
videotag with thesrcattribute and optionally thecontrolsattribute. The value ofsrcis the video link, and thecontrolsattribute has no value as it simply enables the control buttons. - Any element can be placed inside a hypertext link to make it a link.
- A hypertext link can link to a specific section of a page by starting the value of the
hrefattribute with the symbol#followed by the value of theidattribute of the element we want to scroll to.
In this lesson, we learned how to create not only media content like images and videos, but also how to use links and what attributes are. In the next lesson, we will learn how to create tables in HTML and all the associated details.
Instructions
Congratulations on completing the third lesson! The editor contains your final code from this lesson. Now you can customize the page with your newly acquired knowledge.
Start programming for free
10/10