Tech Support Websites

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Tuesday, 21 February 2012

HOW TO link directly to a certain part of a web page that you don't own

Posted on 08:59 by Unknown
This trick works only if the HTML container of the portion of the web page that you wish to link to has an ID attribute.

Generally, "named anchors" can be coded to allow jumping to links within the same page when you own those pages.

Named anchors are often used to create "table of contents" at the beginning of a large document. Each chapter within the document is given a named anchor, and links to each of these anchors are put at the top of the document.

The upcoming HTML5 standard suggests using the id attribute instead of the name attribute for specifying the name of an anchor. Using the id attribute actually works also for HTML4 in all modern browsers.

Now what if you were reading an long article on a site you don't own & wanted your friend to read only a specific portion that's interesting. As I discovered from this answer on the WebApps StackExchange forum, you can append the "id" of the HTML element that contains the interesting portion to the URL after preceding it with a hash.

This trick assumes that the portion of the page that's of interest is within a HTML element like p(ara) or div tag and is uniquely identified through an ID attribute. To check this, you have to scan the HTML source (Developer tools that come natively with browsers or Firebug or the View Selected Source option in Firefox can let you easily jump to a specific element) of the webpage that you want to link to and see if the container of interesting material has an ID

Let us say, I wanted to share a link that specifically explains what a "Fold-in" is. Rather than share the link to the Wikipedia article (http://en.wikipedia.org/wiki/Al_Jaffee) about the inventor of the "Fold-in", Al Jaffee, I can directly send you to the description of the "Fold-in" within that article -
http://en.wikipedia.org/wiki/Al_Jaffee#The_Fold-In
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in HOWTO, HTML5 | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • 10 ways to make laptop battery last longer
    Paraphrased from a Right Choice magazine article with my own opinions: Keep the brightness of the screen as low as possible. If portability ...
  • Manipulate PDF files for free with PDFRider
    PDFRider (currently in version 0.5) is an open source project on Codeplex. This utility provides a GUI for the command-line program  Pdftk ...
  • A new JavaScript Reference to bookmark
    For years, the JavaScript section at W3Schools.com has been a indispensable source of reference for me . It will now not be my only source. ...
  • HOW TO read long text messages on the Samsung Omnia 652
    Samsung Omnia 652 clumps text messages from a single recepient together. Scrolling through a message doesn't reveal the entire message ...
  • Look what Google Goggles visual search can do
    Google Goggles is a visual search application available currently for Android powered phones. It may possibly be available for phones of oth...
  • HOW TO try Windows Azure for free (without any credit card)
    Windows Azure, Microsoft's cloud platform offers .NET developers a great opportunity to extend their skills to this new platform. You do...
  • NDepend - a powerful .NET code analysis tool
    Nearly a decade ago, I was amazed when a not-so-technical project manager gave detailed feedback on my C# code in a project I was working on...
  • Words that leave Google Instant speechless
    2600 Magazine has compiled a list of objectionable words that Google Instant has blacklisted. Several volunteers have submitted blackliste...
  • Pluralsight Introduction to PowerShell Course - Notes
    Summary of the 2hour 40 minute duration Pluralsight   Introduction to PowerShell course, including other interesting material I found - + W...
  • What is the difference between Browser Mode & Document Mode in IE
    If you're a web developer and your job actively involves building web pages that work the same in all browsers including the last three ...

Categories

  • AJAX
  • Android
  • APIs
  • App
  • ASP
  • ASP.NET
  • ASP.NET-MVC
  • Azure
  • Azure SQL Database
  • AzureInPictures
  • Bing
  • Book Review
  • Bookmarklet
  • Browsers
  • C#
  • chart
  • Chrome
  • Cloud
  • CSS
  • CSS3
  • DidYouKnow
  • E-Commerce
  • Excel
  • FB
  • Fiddler
  • Firefox
  • Gadgets
  • GeoLocation
  • GMail
  • Google
  • Google Docs
  • Google Reader
  • Health
  • Hotmail
  • HOWTO
  • HTML
  • HTML/CSS
  • HTML5
  • Humor
  • Hyderabad
  • IE
  • IIS
  • India
  • Internet
  • IT
  • Javascript
  • jQuery
  • JSON
  • JSONP
  • Laptop
  • Learning Resources
  • Lists
  • Map
  • Metrics
  • Microsoft
  • miscellaneous
  • Mobile
  • NAPA
  • Office365
  • Opera
  • PDF
  • Performance
  • Personal
  • PHP
  • PM
  • PowerShell
  • Privacy
  • Programming
  • Rant
  • Safari
  • Science
  • Search Engines
  • SearchEngines
  • Security
  • SEO
  • Sharepoint
  • SharePoint2013
  • Silverlight
  • Software Engineering
  • Solutions
  • SQL Azure
  • SQL Server
  • TFS
  • Tip
  • Tips
  • Tools
  • Tools/Utilities
  • Trivia
  • TWIL
  • Twitter
  • UX
  • VM
  • VS.NET
  • VS2010
  • VS2012
  • WCF
  • WebApps
  • Websites
  • WF
  • Windows Phone
  • Windows7
  • Windows8
  • Word
  • WP7
  • WPF

Blog Archive

  • ►  2013 (112)
    • ►  October (16)
    • ►  September (14)
    • ►  August (8)
    • ►  July (8)
    • ►  June (13)
    • ►  May (12)
    • ►  April (12)
    • ►  March (8)
    • ►  February (15)
    • ►  January (6)
  • ▼  2012 (127)
    • ►  December (11)
    • ►  November (14)
    • ►  October (13)
    • ►  September (14)
    • ►  August (16)
    • ►  July (16)
    • ►  June (6)
    • ►  May (5)
    • ►  April (11)
    • ►  March (12)
    • ▼  February (7)
      • Technical stats & info about IRCTC - India's large...
      • HOW TO link directly to a certain part of a web pa...
      • Free online services to find what a site is runnin...
      • Online IDEs for C# - frill free Visual Studio alte...
      • Beware of breaking changes in jQuery library versions
      • Just using stored procedures doesn't prevent SQL I...
      • Sample SQL Server database scripts
    • ►  January (2)
  • ►  2011 (98)
    • ►  December (5)
    • ►  November (2)
    • ►  October (5)
    • ►  September (7)
    • ►  August (7)
    • ►  July (15)
    • ►  June (10)
    • ►  May (7)
    • ►  April (8)
    • ►  March (10)
    • ►  February (11)
    • ►  January (11)
  • ►  2010 (163)
    • ►  December (14)
    • ►  November (19)
    • ►  October (19)
    • ►  September (15)
    • ►  August (18)
    • ►  July (17)
    • ►  June (20)
    • ►  May (17)
    • ►  April (19)
    • ►  March (5)
Powered by Blogger.

About Me

Unknown
View my complete profile