I put this code, but it does not work.
<ul>
<li><a
href="#Introduction">Introduction</a></li>
<li><a
href="#Habitat">Habitat</a></li>
<li><a
href="#Media">Media</a></li>
</ul>
Any help
I put this code, but it does not work.
<ul>
<li><a
href="#Introduction">Introduction</a></li>
<li><a
href="#Habitat">Habitat</a></li>
<li><a
href="#Media">Media</a></li>
</ul>
Any help
In order to help you, we’re going to need two things:
the href attribute can’t be be on a separate line, the whole opening tag (including href) should be on a single line, for example:
<a href="#">
Your text</a>
Even better, would be to just have it all on one line, like so:
<a href="#">Your text</a>
agree, or something like:
<li>
<a href="#">Your text</a>
</li>
I was just showing where the limits are
I tried all 3 ways but it still does not work.
<ul>
<li>
<a href="#Introduction">
Introduction</a>
</li>
<li>
<a href="#Habitat">
Habitat</a>
</li>
<li>
<a href="#Media">
Media</a>
</li>
</ul>
<ul>
<li><a href="#Introduction">Introduction</a></li>
<li><a href="#Habitat">Habitat</a></li>
<li><a href="#Media">Media</a></li>
</ul>
<ul>
<li>
<a href="#Introduction">Introduction</a>
</li>
<li>
<a href="#Habitat">Habitat</a>
</li>
<li>
<a href="#Media">Media</a>
</li>
</ul>
Don’t use capitals on ID’s. introduction
, habitat
, media
.
That was a problem:
It works now.
Many thanks.
I had typed my href in capital letter too and ran into the same problem. First time I’ve heard that HTML is case sensitive. Are there any other tags in HTML where caps make a difference?
HTML5 is XML conforming so the answer is, no uppercase tags. To use uppercase tags, switch the doctype to HTML 4.1 (then again, why would do this?)
Thanks for the tip! They should mention that in the HTML5 training, I
had a hard time figuring out what I had done wrong. Thanks again!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.