When one wants to refer to some part of a webpage with the \"http://example.com/#foo\" method, should one use
F
In html 5, the id="" attribute defines a unique identifier for an element, which is also an anchor for a fragment link. In previous html standards, the name="" attribute of the element defines an anchor for a fragment link. I recommend something like:Foo Title
Because support for the id="" attribute is a bit spotty(even though the latest releases of all major browsers support it, the releases that don't aren't more than a few years old[And it's best not to break something if there isn't a good reason to]). It's compatible, & it doesn't style whatever's in the link'd element, for the closing is still outside the element, but it's still valid in all current standards.
Be sure that the name="" and id="" attributes of the element are the same.