Skip to main content
100%

Link anatomy

✓ Published0🌍 Public
Aabernier
Last edited Mar 31, 2017
Created on Jul 8, 2012

This interactive HTML page dissects a URL into its semantic components—protocol, host, port, pathname, search, and hash—by displaying each part as a clickable span. Hovering over a component highlights it with a tooltip label, while clicking sets the page’s hash to that component’s ID, updating the browser location. The implementation uses jQuery for click handling and CSS pseudo-elements for tooltips, with a fixed example URL hardcoded in the markup.

AI-generated description

Originally from http://stackoverflow.com/questions/6725890/location-host-vs-location-hostname-and-cross-browser-compatibility/11379802#11379802

TODO

  • deal with anchors to be able to copy links
  • make parts contenteditable

Similar vizzes