html - anchor tag div name -
i'm running trouble here, appreciated. i'm trying link section on page. i'm having trouble. check code:
<a href="#h2">consulting</a>
that's link, here's block i'm wanting link to:
<div class="space" name="h2"> <h1 class="h2">consulting</h1> <p class="paragraph">blah</p> </div>
now think have wrong, i'm trying not keep messy. have
<a name="h2">blah</a>
to make work, or can doing, , missing something?
with url fragments want target id, not class. change to:
<div class="space" name="h2"> <h1 id="h2" class="h2">consulting</h1> <p class="paragraph">blah</p> </div>
per mdn:
a url fragment name preceded hash mark (#), specifies internal target location (an id) within current document.
see also: http://www.w3.org/tr/html401/struct/links.html#h-12.2.3
Comments
Post a Comment