HTML Links Bookmarks: How to Create Them

In this article, we’ll discuss what HTML Links bookmarks are, how to create them, and why they’re useful.

HTML links are a great way to connect pages and create a cohesive user experience. However, when dealing with longer webpages, it can be challenging for users to navigate to the specific content they need.

This is where HTML Links bookmarks come in handy. Bookmarks allow users to jump to a specific section of a webpage with just one click.

By linking the links between sections or to other relevant web pages, HTML bookmarks are used by web designers to control the flow of their web pages.



HTML Links Bookmarks

HTML Links bookmark, also known as anchor links, are clickable links that take users to a specific section of a webpage.

They work by assigning an ID to a specific element on the page, such as a heading, and then creating a link that points to that ID.

When the link is clicked, the browser automatically scrolls to the specified element.

Syntax

To create a bookmark, we should use the id attribute

<h1 id="id name or number">content</h1>

Next, add a link to the bookmark that will allow you to jump within the content of the same page or to another page in HTML links.

<a href="#section id">Name of the Heading</a>

HTML Bookmark Detailed Example

The example below shows the detailed work how the bookmarks work and how can we use it in our length pages of the websites as it comes to HTML links:

Example: 

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html> <head> </head> <body> <p><a href="#SEC1">Jump to Section 1</a></p> <p><a href="#SEC2">Jump to Section 2</a></p> <p><a href="#SEC3">Jump to Section 3</a></p> <h2 id="SEC1" style="margin-bottom:0;">Section 1</h2> <div class="div-text" style="padding-bottom:40%">Amazon, one of the most valuable companies in the world, was founded in 1994 by Jeff Bezos. Initially an online marketplace, the company started to produce its own technological devices and offer cloud services over time. As well as ranking as the world's 6th largest company in Forbes' list, it's listed among the top 25 tech and IT companies to work for -a.k.a. best workplaces! </div> <hr style="margin-bottom:150px"> <h2 id="SEC2" style="margin-bottom:0;">Section 2</h2> <div class="div-text" style="padding-bottom:40%">Launched by Mark Zuckerberg in 2004 to connect Harvard students with one another, Facebook was an instant hit. In 2 years, it became open to public use. In 2010, more than 400 million people were using it monthly. In 2021, Facebook Inc. changed its name to Meta Platforms to emphasize its orientation to the metaverse. Virtual/augmented reality is the future, and Meta claims to help people exist there. </div> <hr style="margin-bottom:150px"> <h2 id="SEC3" style="margin-bottom:0;">Section 3</h2> <div class="div-text" style="padding-bottom:40%">Oracle is an American computer software company. It was founded in 1977, in California, but the corporate headquarters are in Austin, Texas now. They have more than 400,000 customers across the world, including FedEx, Xerox, and Siemens Healthineers, as they provide specific solutions for different industries. You can manage your restaurant, modernize your finances, secure network infrastructure solutions, connect HR/product management/marketing and increase client satisfaction. </div> <hr style="margin-bottom:150px"> </body> </html>


HTML bookmark examples

Creating a bookmark begins with the id attribute in HTML links:

<h2 id="MXC4">Mr examples chapter 4</h2>

Then, from the same page, add a link to the bookmark that says, “Jump to Mr examples chapter 4”:

Example:

<!DOCTYPE html> <html> <body><a href="#MXC4">Jump to Mr examples chapter 4</a></body> </html>
Here is another example of bookmark:

Example: 

<!DOCTYPE html> <html> <body> <p> <a href="#C2">Jump to Heading 2</a> </p> <h2>Section 1</h2> <p>This Heading explains Section 1</p> <h2 id="C2">Section 2</h2> <p>This Heading explains Section 2</p> </body> </html>

TagOverview
<a>Represents a hyperlink.
Visit our HTML Tag Reference for a comprehensive list of all possible HTML tags.

HTML Bookmarks Benefits

HTML bookmarks have several benefits for both website owners and users.

Here are a few:

Improved User Experience

Bookmarks make it easier for users to navigate long webpages by allowing them to jump to specific sections quickly.

Increased Engagement

By making it easier for users to find the content they’re looking for, bookmarks can help keep users on your site for longer periods of time.

Search Engine Optimization

Bookmarks can also help with SEO by providing additional content to search engines. When search engines crawl your site, they can use the bookmarked content to better understand the context of your page.

Accessibility

Bookmarks can also be helpful for users with disabilities, as they can allow them to navigate webpages more easily.


Conclusion

HTML Links bookmarks are a simple but powerful feature for improving the user experience of your website.

By allowing users to quickly jump to specific sections of a webpage, bookmarks can increase engagement, improve accessibility, and even boost your site’s SEO.

Whether you’re creating a long-form article or a complex web application, bookmarks are a useful technique to keep in mind.

Do leave your reaction below to appreciate our efforts or to suggest us with some improvements for the betterment of this site.
We value your feedback.
+1
0
+1
0
+1
0
+1
0
+1
0
+1
0
+1
0

Subscribe To Our Newsletter
Enter your email to receive a weekly round-up of our best posts. Learn more!
icon

Leave a Reply

Your email address will not be published. Required fields are marked *