Science, Tech, Math › Computer Science How to Add Internal HTML Links Using the ID attribute tag to create page bookmarks Share Flipboard Email Print Science, Tech, Math PHP Programming Perl Python Java Programming Javascript Programming Delphi Programming C & C++ Programming Ruby Programming Visual Basic View More By Jennifer Kyrnin Jennifer Kyrnin Writer University of California University of Washington Jennifer Kyrnin is a professional web developer who assists others in learning web design, HTML, CSS, and XML. Learn about our Editorial Process Updated on February 24, 2021 What to Know Name section by adding an ID attribute to the tag. Create the internal link as you would for an external link, but replace the URL with the ID.HTML 4 and earlier versions used the name attribute to form internal links. HTML 5 uses the ID attribute instead. ID attribute tags allow site visitors to click a link and be transported to a bookmarked location within the same document. A typical application is a list of included topics at the top of an article, similar to a table of contents. Here's how to add internal links in HTML. How to Add Internal HTML Links This approach entails naming the area to which you'd like to link and then creating a link to it using an ID attribute. Here's how: Decide which section of the page you'd like to link to. As an example, let's say you want to link to the last paragraph at the bottom of a page. Name the appropriate section by adding an ID attribute to the tag. In this example, it's named lastparagraph, like so: The last paragraph Create the internal link just as you would for the more common external link, but replace the URL with the ID of the last paragraph: The link Test your link. W3Schools offers a free online code "sandbox" where you can test your HTML. Cite this Article Format mla apa chicago Your Citation Kyrnin, Jennifer. "How to Add Internal HTML Links." ThoughtCo, May. 14, 2021, thoughtco.com/adding-internal-links-3466484. Kyrnin, Jennifer. (2021, May 14). How to Add Internal HTML Links. Retrieved from https://www.thoughtco.com/adding-internal-links-3466484 Kyrnin, Jennifer. "How to Add Internal HTML Links." ThoughtCo. https://www.thoughtco.com/adding-internal-links-3466484 (accessed March 31, 2023). copy citation