Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Problemy ze zgodnością z W3C XHTML 1.0
Forum PHP.pl > Forum > Po stronie przeglądarki > HTML \ XHTML
hzl_91
Witam! Mam problem z uzyskaniem zgodności W3C XHTML 1.0 pare błędów już poprawiłem ale te które zostały nie mogę sobie poradzić. Jeśli jest możliwość proszę o poprawienie mojego kodu tak, aby był zgodny z W3C XHTML 1.0. Przeczytałem już pare poradników i za chiny nie mogę sobie poradzić.

Oto link do validator: http://validator.w3.org/check?uri=http%3A%...fo%2Findex.html

A to kod:
  1. <?xml version="1.0" encoding="ISO-8859-2"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  3.  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl">
  5.  
  6. <head>
  7. <meta http-equiv="Content-type" content="text/html; charset=iso-8859-2" />
  8. <title>HZL-Project.info</title>
  9. <link rel="stylesheet" type="text/css" href="theme/style.css" />
  10. </head>
  11.  
  12. <body>
  13.  
  14. <div align="center">
  15.  <table width="526" class="tabela" id="AutoNumber1">
  16.    <tr>
  17.      <td valign="top">
  18.      <img border="0" src="theme/logo.jpg" width="209" height="70" /></td>
  19.    </tr>
  20.    <tr>
  21.      <td>
  22.      <table cellpadding="0" cellspacing="0" class="tabelka" id="AutoNumber2">
  23.        <tr>
  24.          <td>
  25.          <p style="margin-top: 0; margin-bottom: 0"><map name="FPMap0">
  26.          <area href="systemy/" shape="rect" coords="11, 36, 208, 151">
  27.          <area href="pozycjonowanie/" shape="rect" coords="313, 36, 511, 151">
  28.          <area href="webdesign/" shape="rect" coords="11, 217, 209, 331">
  29.          <area href="twojepropozycje/" shape="rect" coords="313, 217, 512, 331">
  30.          </map>
  31.          <img border="0" src="theme/menu.jpg" usemap="#FPMap0" width="524" height="342"></td>
  32.        </tr>
  33.        </table>
  34.      </td>
  35.    </tr>
  36.    </table>
  37. </div>
  38. <center>      <p style="margin-top: 0; margin-bottom: 0">Wszelkie prawa zastrzeżone dla
  39.      <a href="http://hzl-project.info">HZL-Project.info</a></p>
  40.      <p style="margin-top: 0; margin-bottom: 0">Strona zgodna z
  41.      <a target="_blank" href="http://jigsaw.w3.org/css-validator/validator?uri=http://hzl-project.info/theme/style.css">W3C CSS Validator</a> i
  42.      <a target="_blank" href="http://validator.w3.org/check?uri=referer">W3C XHTML 1.0</a></center>
  43.  
  44. </body>
  45.  
  46. </html>
shpyo
No panie... jak piszesz xHTML i dajesz takie rzeczy jak :
  1. <div align="center">


xHTML jest po to aby wszystko lub prawie wszystko kontrolować w CSS!
UNK
Do każdego <img ../> oraz <area ...> dodaj atrybut alt='' może on być pusty ale musi być aby była zgodność w W3C.

Line 31 column 93: end tag for "img" omitted, but OMITTAG NO was specified. nie zakończony tag img.

Line 25 -> 31 (początek -> ewentualny koniec) niezakończony tag p.
Line 40 -> 42 j.w.

Nie używałem nigdy map ale zamiast name użyj id o tej samej wartości albo nie zamiast, tylko dodaj.

Zamiast używać align użyj class (add: styli) tongue.gif (to jeśli chodzi o centrowanie, innego pomysłu nie mam winksmiley.jpg )

dodaj target z href (nie wiem czy jest w tym jakaś różnica)

Jeśli wszystko poprawisz zobaczymy co zostało z tych błędów :-)

EDIT: shpyo mnie wyprzedził z jedną rzeczą :-) więc miałem co do tego w sumie racje winksmiley.jpg
MatheW
Cytat
there is no attribute "align".
zamiast align daj style="padding: wyrównanie

Cytat
there is no attribute "height"
zamiast height daj style="height: wysokosc px"

Cytat
there is no attribute "border".
zamiast border daj style="border: szerokosc px"

Cytat
required attribute "alt" not specified.
musisz dac alt=""

Cytat
there is no attribute "name".
zamiast name daj id

Cytat
but OMITTAG NO was specified.
nie zamknałeś znacznika - daj <img .... />

Cytat
element "center" undefined.
nie ma juz center. daj <p style="text-align:center">

Cytat
ere is no attribute "target".
Nie ma juz atrybutu target. Ratuj się js

//edit byli szybsi, ale opisalem chyba wszystko
dr_bonzo
Przenosze na Po stronie przeglądarki > HTML \ XHTML
hzl_91
Ok strona jest zgodna tylko teraz poprawmy niedziałające rzeczy.
no wiec tak:
1) jak w .css wyśrodkować tabele?
2) Nie działa mi
  1. <area href="systemy/" alt="" shape="rect" coords="11, 36, 208, 151" />
  2. <area href="pozycjonowanie/" alt="" shape="rect" coords="313, 36, 511, 151" />
  3. <area href="webdesign/" alt="" shape="rect" coords="11, 217, 209, 331" />
  4. <area href="twojepropozycje/" alt="" shape="rect" coords="313, 217, 512, 331" />
shpyo
Cytat(MatheW @ 14.08.2006, 13:56 ) *
zamiast align daj style="padding: wyrównanie

musisz określić szerokość, następnie wyrównać marginsy.
  1. .centruj
  2. {
  3. width: 800px;
  4. margin: auto;
  5. }

działa w ff, ie, opera i innymi smile.gif
Cytat
Nie ma juz atrybutu target. Ratuj się js

  1. <a href="link" onclick="target='new'"
hzl_91
2) Nie działa mi
  1. <area href="systemy/" alt=""  shape="rect" coords="11, 36, 208, 151" />
  2.          <area href="pozycjonowanie/" alt=""  shape="rect" coords="313, 36, 511, 151" />
  3.          <area href="webdesign/" alt=""  shape="rect" coords="11, 217, 209, 331" />
  4.          <area href="twojepropozycje/" alt=""  shape="rect" coords="313, 217, 512, 331" />


Niedziałą w tym sęsie że nie daje linka

Pomoże ktoś?
bim2
A zobacz z innej storny, nie lepiej pociąć ten obrazek i dac mu <a? Np taki niewidzący korzystajacy z latek do czytania nic nie usłyszy. Najlepiej potnij dodaj alty w stylu INDEX, FORUM itp i daj <a winksmiley.jpg

Albo lepiej zrób to bez tabelek a na div smile.gif Chetnie ci w tym pomogę ;P

EDIT: Daj <map id="... ;P
hzl_91
OK Temat można zamknąć już sobie poradziłem ze wszystkim dzięki chłopaki winksmiley.jpg

Bim dobrze mnie znasz i wiesz że wole grzebać w obrazkach haha.gif Wolę się pogłębiać w trudniejszych rzeczach niż poznawac podstawy ;d

EDIT: przecież jest <map id="">
bim2
Na samej gorze w wklejonym teksicie nie bylo :|

PS. jak rozwiązałeś? Innym się przyda tongue.gif
hzl_91
Rozwiązałem to tak, że po prostu pociełem graficzke.

A i jeszcze mam problem, nie mogę dostać zgodności za to:
Cytat
# Error Line 26 column 21: document type does not allow element "table" here; missing one of "button", "map", "object", "ins", "del", "noscript" start-tag.

<table class="logo">

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").


# Error Line 35 column 24: document type does not allow element "table" here; missing one of "button", "map", "object", "ins", "del", "noscript" start-tag.

<table class="tabelka">


A i jak w .css zrobić wysokość np. tabelki bo height nie jest zgodne z w3c css validator
bim2
Height tabelek dajesz w style"height: 100px;" aarambo.gif
hzl_91
Wiem wcześniej to już zrobiłem ale dalej tkwie z błędem:
Cytat
# Error Line 26 column 21: document type does not allow element "table" here; missing one of "button", "map", "object", "ins", "del", "noscript" start-tag.

<table class="logo">

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").


# Error Line 35 column 24: document type does not allow element "table" here; missing one of "button", "map", "object", "ins", "del", "noscript" start-tag.

<table class="tabelka">
dr_bonzo
Mi zwalidowalo tego linka w pierwszym poscie, wiec gdzie jest ta bledna strona?
hzl_91
Tu link do błędnego kodu -> http://hzl-project.info/systemy/
dr_bonzo
Nie mozesz wstawiac tabelki do <p>.
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.