I created my online portfolio and it's one page, I used anchor tags on the top menu which work perfectly in chrome but in explorer and Firefox when you click the skills tab it lands somewhere in the middle of my work anyone know why a simple tag might not load right in some browsers??
Asked
Active
Viewed 97 times
1 Answers
1
It seems that you make an anchor with an <a>
element with the name
parameter. To make an anchor, you need an id
.
Example:
<div id="skill"/>
or with a div
with some content:
<div id="skill">
...
</div>
The reason is that using the name
attribute in the <a>
attribute is obsolete since html5.
Documentation from the MDN:
This attribute is required in an anchor defining a target location within a page. A value for name is similar to a value for the id core attribute and should be an alphanumeric identifier unique to the document. Under the HTML 4.01 specification, id and name both can be used with the
<a>
element as long as they have identical values.

Mr Lister
- 45,515
- 15
- 108
- 150

Alec von Barnekow
- 981
- 9
- 22
-
I'm not sure this is the answer, but the consensus seems to be that you should follow @Fralec's suggestion anyway. For a more in-depth explanation, see http://stackoverflow.com/questions/484719/html-anchors-with-name-or-id – LinuxDisciple Oct 03 '16 at 17:40
-