Visualizzazione dei risultati da 1 a 5 su 5

Discussione: errori validazione

  1. #1
    Utente di HTML.it
    Registrato dal
    May 2009
    Messaggi
    43

    errori validazione

    Non so come correggere questi 3 errori che mi indica la procedura di validazione.

    Le prime 3 linee della pagina processata sono queste:


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >


    e questi sono gli errori:

    Errore 1

    Line 2, Column 53: DTD did not contain element declaration for document type name

    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    A DOCTYPE declares the version of the language used, as well as what the root (top) element of your document will be. For example, if the top element of your document is <html>, the DOCTYPE declaration will look like: "<!DOCTYPE html".

    In most cases, it is safer not to type or edit the DOCTYPE declaration at all, and preferable to let a tool include it, or copy and paste it from a trusted list of DTDs.


    Errore 2
    Line 3, Column 58: document type does not allow element "html" here

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >

    The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

    One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

    Errore 3

    Line 97, Column 8: no document element

    </ht…


    L'errore 3 sarebbe la linea </html> di chiusura pagina ????
    Grazie a chiunque mi possa fornire qualche spigazione!

  2. #2
    html nella prima riga va scritto minuscolo

  3. #3
    Utente di HTML.it
    Registrato dal
    Sep 2001
    Messaggi
    21,188
    In realta` il validatore segnala qualsiasi cosa quando non capisce.
    I "tre" errori sono riconducibili ad uno solo: ha trovato un errore di sintassi nel <!DOCTYPE> e quindi da un lato non riconosce il DOCTYPE e dall'altro non riesce piu` a validare il resto della pagina.

    Prova a mettere il DOCTYPE su un'unica riga (nel file ci deve essere uno spazio non un acapo).
    codice:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    Nuova politica di maggiore severita` sui titoli delle discussioni: (ri)leggete il regolamento
    No domande tecniche in messaggi privati

  4. #4
    Utente di HTML.it
    Registrato dal
    May 2009
    Messaggi
    43
    Perfetto! E' bastato solo quello e sono spariti tutti gli errori. Grazie, grazie mille!

  5. #5
    Utente di HTML.it
    Registrato dal
    May 2009
    Messaggi
    43
    Ho scritto html minuscolo e, per ora, mi ha validato la pagina.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.