Summary

In the third lesson, we learned that:

  • Attributes are written in the form of name="value".
  • Hypertext links are created using the a element with the href attribute, whose value is the link we want to open.
  • Hypertext links can open a link in a new window by adding the target attribute 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 img tag with the src and alt attributes, where the value of src is the image link and the value of alt is the description for screen readers.
  • Videos are added using the video tag with the src attribute and optionally the controls attribute. The value of src is the video link, and the controls attribute 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 href attribute with the symbol # followed by the value of the id attribute 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

By signing up, you agree to the Terms of Service and Privacy Policy.

Or sign up with:

10/10

Summary | Start Coder