• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
DailyBlogTips.com

DailyBlogTips.com

DailyBlogTips.com takes you from SEO to CEO. You’ll learn everything you need to know to master blogging, SEO, marketing, web design leading you to passive income.

  • Popular
  • Contributors
  • About
  • Contact / Advertise
  • Blogging
  • Marketing
  • Design
  • Money
  • Reviews
  • Productivity

Linking Inside a Page

By Mark 1 Comment Reading Time: 2 minutes

by Adam

Most bloggers aren’t trained webmasters, but manage to pick up enough HTML to be dangerous along the way. Occasionally, though, this haphazard approach leaves a gap in our expertise that needs filling. For example, not all bloggers are aware of HTML fragments.

A fragment is a name that you apply to an element of a web page. For example, you might identify a heading as a fragment named “heading1?. Doing this is useful because you can then link to that section of the page, allowing your users to instantly jump to that spot. You’ve probably seen this sort of thing in tables of contents on long articles or in “Return to the Top” links. These are examples of fragments in action.

To create a fragment, all you do is add id=”fragment-name” to the HTML enclosing the element to be identified. This could be a heading, a paragraph, an arbitrary span, or whatever else is used to identify that spot. Suppose you want to create a fragment around a specific paragraph. The code would look like this:

Text of the paragraph...

To link to a fragment, you create a normal link to the web page and add #fragment-name to the end of the link.

link text

The W3C’s article on links in HTML documents is both a perfect example and a handy resource for fragment use. If you view the source code, you can see how they take a systematic approach to naming the headings of page sections and linking those sections in their table of contents.

This may or may not be useful for blog posts, which are rarely long enough to require additional navigation. However, it certainly can be useful for a blog’s larger static pages, such as (in Daniel’s case) an “About Us” page featuring multiple authors.

Linking Inside A Page Photo

Linking Inside A Page Photo

About Mark

Mark is an digital entrepreneur from New York City who recently acquired DBT. He started his ventures buying growing then selling several businesses and content blogs on Flippa. A perfect night for him constitutes pizza, wine, slow jazz and WordPress! He's an SEO expert and a growth strategist. When he's not working on his businesses he enjoys sharing his learned lessons with the DBT community.

Reader Interactions

Leave a Reply Cancel reply

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

Primary Sidebar

Trending Today

Popular

  • 28 Ways to Make Money with Your Website 514 Comments
  • 43 Web Design Mistakes You Should Avoid 474 Comments
  • 4 Steps to Increase Your Blog Traffic 188 Comments
  • How to Find Advertisers for Your Website 126 Comments
  • Top 25 SEO Blogs 243 Comments
  • 101 Blog Tips I learned 177 Comments
  • 30 Traffic Generation Tips 351 Comments
  • 6 Ways to Speed Up Your Site 51 Comments
  • 9 Hacks to Show Readers Your Best Stuff 21 Comments
  • 50 Simple Ways to Gain RSS Subscribers 145 Comments
  • The Best Website Taglines 127 Comments
  • What Is Success? 57 Comments
  • How to setup a 301 Redirect 52 Comments
  • The 7 Characteristics of Good Domains 76 Comments
  • 7 Ways to Promote your Site 133 Comments
  • Top 25 Celebrity Blogs 44 Comments
  • What Is A Blog? 81 Comments
  • Blog Setup: 40 Practical Tips 57 Comments
  • 10 Tips To Write Your Most Popular Post 79 Comments
  • The Blog Post Checklist 75 Comments
  • Interview: 12 Top Online Entrepreneurs 98 Comments
  • What Is Bounce Rate? 42 Comments
  • 20 SEO Terms You Should Know 28 Comments
  • How To Choose A Blog Name 15 Comments
  • 10 Tips to Sell Your Website on Flippa 37 Comments
  • Top 25 Web Design Blogs 80 Comments

Make Money & Earn a Passive Income Online

Blogging, SEO, Monetization & Traffic. Online business done right. Take your marketing efforts to the next level with tips and resources to get visitors to your website.
As featured
CNBC copyblogger problogger Entrepreneur Lifehacker Hubspot Business Insider Wordpress Showcase Neil Patel Yoast Cisco Smashing Magazine
Privacy Policy| Terms of Service | About | Contact

DBT Logo
Born in Miami, FL
DBT is an independent website. The views expressed on this site may come from individual contributors and do not necessarily reflect the view of DBT or any other organization. All Content Copyright ©2006-2023. Daily Blog Tips unless otherwise noted or credited.