FMWDS

#5

What element is used to create a link? <a> (Anchor)

What is an attribute? An attribute provides additional information about an HTML element and is always included in the opening tag.

What attribute tells links where to go to? The href attribute specifies the destination URL for links. html Code: <a href="https://www.example.com">Visit Example</a>

What security considerations must be taken if you wish to use the target attribute to open links in a new tab/window? Using target="_blank" can pose security risks (targeting links to a new tab/window). It’s important to use rel="noopener noreferrer" to enhance security and prevent potential vulnerabilities.

What is the difference between an absolute and relative link? An absolute link provides the complete URL, starting from the root domain (e.g.,https://www.example.com/page). A relative link specifies the path relative to the current document or location (e.g., page.html or ../folder/page.html).

Which element is used to display an image? <img>

What two attributes do images always need to have? src (source): Specifies the image file’s URL. alt (alternative text): Provides a text description of the image. <img src="image.jpg" alt="Description">

How do you access a parent directory in a filepath? Use ../ to move up one level in the directory hierarchy.

What are the four main image formats that you can use for images on the web? JPEG, PNG, GIF, and SVG.