HTML: HYPERLINKS USING ANCHORS

Overview Resources

Given the image below, the following relative paths are from the perspective of the index.html file.

../test.html          # go up one directory and access the test.html file
../files/blah.html    # go up one directory and then into the files directory, and access the blah.html file
../images/dogs/a1.png # go up one directory, then into the images directory, then into the dogs directory, and access the a1.png image
styles/my_style.css   # go into the styles directory and access the my_style.css file
styles/dark/new.css   # go into the styles directory, then into the dark directory, and access the new.css file

Download the sample files to experiment with relative file paths (and view the home/index.html).

Linking to pages within your own site

Linking to external pages

See the Pen by vanwars (@vanwars) on CodePen.

Additional Resources

Linking to page regions

See the Pen by vanwars (@vanwars) on CodePen.

Additional Resources

results matching ""

    No results matching ""