Ocena wątku:
  • 0 głosów - średnia: 0
  • 1
  • 2
  • 3
  • 4
  • 5
walidacja... problem z linkiem
#1
witam serdecznie...

doszedlem do etapu walidacji.. pozostal mi jedne błąd a mianowicie:

Cytat:Line 32, Column 10: Attribute "name" exists, but can not be used for this element.
<a name="ja"> </a>
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

w pliku w któym mam ową linie jest tak:

Kod:
<a href="#ja">O mnie</a>

a nastepnie niżej (do którego odnosi się wyzej zacytowany błąd):
Kod:
<a name="ja"> </a>

dlaczego pojawia się błąd i co zrobić aby pozostawić działanie odsyłącza i poprawnie zwalidowac stronę?
Odpowiedz
#2
No masz napisane, że <a> nie posiada atrybutu name i nie możesz go użyć.
Odpowiedz
#3
tzn to to wiem dlatego napisalem jak zostawic działanie/funkcjonalność?

chodzi o to aby z sidebaru byly kierowane linki do miejsc na stronie... jest to jedna długa strona... a sidebar jest w miejscu statyczny w stosunku do reszty...
Odpowiedz
#4
No pierwszy odsyłacz masz dobrze, jest tam kotwica kierująca do elementu o id="ja" , więc nie wiem czemu miałoby służyć to name i jaką "funkcjonalność" Ci daje?
Odpowiedz
#5
Po prostu w drugim linku zmień atrybut name na id i będzie ok.
Odpowiedz
#6
dziekuje za pomoc Smile
Odpowiedz


Podobne wątki…
Wątek: Autor Odpowiedzi: Wyświetleń: Ostatni post
  walidacja formularza hieroshima 2 2,106 02-08-2012, 13:49
Ostatni post: hieroshima
  Ponowny problem z walidacją klucha25 12 7,665 12-12-2011, 03:17
Ostatni post: Kartofelek
  Problem z walidacją klucha25 7 4,606 27-11-2011, 18:31
Ostatni post: Kartofelek
  Walidacja html Jozeph 11 8,077 11-11-2010, 18:24
Ostatni post: Pedro84
  [XHTML 1.0] walidacja a znaczniki <ol> <li> <ul> Motaba 2 2,579 11-12-2009, 13:49
Ostatni post: Motaba

Skocz do:


Użytkownicy przeglądający ten wątek: 1 gości
Sponsorzy i przyjaciele
SeoHost.pl