Chapter 4 - Links (HTML) Flashcards
How are links created?
Using the <a> element, which has an attribute called “href” </a>
URL
Uniform resource locator.
Made up of the domain name followed by the path to that page or image.
Relative URLs
Can be used when linking pages within your own
website.
Provide a shorthand way of telling hte browser where to find your files.
Same Folder
To link to a file in same folder, just use the file name. NOthing else is needed
Child Folder
Use the name of hte child folder, followed by a forward slash, then the file name.
Grandchild Folder
Use the . name of the child folder, followed by a forward slash, then name of the grandchild folder, followed by another forward slash, then the file name.
“movies/dvd/reviews.html”>Reviews
id attribute
You can use the id attribute to target elements within a page that can be linked to .