Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [CSS][HTML] Błędy których (chyba) nie ma - VALIDATOR!
Forum PHP.pl > Forum > Przedszkole
92nasti
Witam,

otóż validator sypie mi błędami, których chyba nie ma, czy to normalne? Poniżej zrzut.

Cytat
Line 1, Column 110: Missing xmlns attribute for element html. The value should be: http://www.w3.org/1999/xhtml
…HTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html>

Many Document Types based on XML need a mandatory xmlns attribute on the root element. For example, the root element for XHTML might look like:
<html xmlns="http://www.w3.org/1999/xhtml">

Line 4, Column 9: "DOCTYPE" declaration not allowed in instance
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.o…

Line 11, Column 34: required attribute "alt" not specified
<img src="images/logo.png">

The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.

Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.

Line 11, Column 35: end tag for "img" omitted, but OMITTAG NO was specified
<img src="images/logo.png">

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

Line 11, Column 8: start tag was here
<img src="images/logo.png">
Line 13, Column 38: there is no attribute "alt"
<a href="index.html" alt="Strona Główna">Strona Główna</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.

Line 26, Column 79: end tag for "img" omitted, but OMITTAG NO was specified
<a href="index.html"><img src="images/logo1.png" alt="Realne Simy"></a>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

Line 26, Column 30: start tag was here
<a href="index.html"><img src="images/logo1.png" alt="Realne Simy"></a>
Line 29, Column 38: required attribute "alt" not specified
<img src="images/diament.png">

The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.

Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.

Line 29, Column 39: end tag for "img" omitted, but OMITTAG NO was specified
<img src="images/diament.png">

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

Line 29, Column 9: start tag was here
<img src="images/diament.png">
mat-bi
A może podaj stronę? Validator podał ci błędy jak na dłoni.
pedro84
Używasz XHTML Strict, a choćby takiego img nie zamykasz.
92nasti
Mój drogi, napisałem że błędów których nie ma, bo to co wywala mi validator, takich błędów kodzie nie ma.
Fifi209
W takim razie nie ma tematu skoro błędów nie ma smile.gif

Podajesz stronkę, zaglądamy w kod albo kończysz się wygłupiać i nie piszesz?
pedro84
Cytat(92nasti @ 26.06.2011, 17:37:20 ) *
Mój drogi, napisałem że błędów których nie ma, bo to co wywala mi validator, takich błędów kodzie nie ma.

Z kosmosu ich nie wziął.

Podasz ten URL czy nie?
sadistic_son
Oczywiście, że są błędy i je gołym okiem widać chociażby w tych logach. Np to:
  1. <img src="images/logo1.png" alt="Realne Simy">
Walidator wyraźnie pisze, że tag IMG jest niedomknięty.
Cytat
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
Jak należy domykać tagi tego typu co IMG, INPUT itp? Tak:
  1. <img src="images/logo1.png" alt="Realne Simy" />
Slash na końcu! Jest różnica?

Dalej.... W3C życzy sobie aby używać atrybutu alt tam gdzie to tylko możliwe, czyli np tu <img alt="jakiś tekst" src="images/logo.png">. Musisz alt wstawić do wszystkich obrazków i linków. Jeśli nie chcesz tekstu alternatywnego to pozostaw to puste czyli samo alt="" powklejaj.

Oprócz tego masz prawdopodobnie niepoprawną deklarację typu dokumentu.

To są Twoje główne i najczęstsze błędy. Resztę wyjaśnimy jak podasz w końcu linka do stronki.

EDIT: To mój tysięczny post smile.gif Zaśpiewa ktoś "sto lat" questionmark.gif wink.gif
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.