Visualizzazione dei risultati da 1 a 6 su 6

Discussione: Validatzione HTML

  1. #1
    Utente di HTML.it
    Registrato dal
    Jul 2006
    Messaggi
    3,072

    Validatzione HTML

    Ciao a tutti, sto validando una pagina HTML... ho risolto quasi tutti i problemi tranne questi (anche leggendo il commento non capisco cosa/come modificare)



    Error Line 1, Column 122: DTD did not contain element declaration for document type name

    …0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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.
    Error Line 2, Column 6: document type does not allow element "html" here

    <html>



    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).
    Error Line 2, Column 1: Missing xmlns attribute for element html. The value should be: http://www.w3.org/1999/xhtml

    <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">
    Error Line 34, Column 38: end tag for "ul" which is not finished

    <ul class="headerMenu">[/list]



    Most likely, you nested tags and closed them in the wrong order. For example

    [i]...</p> is not acceptable, as [i] must be closed before

    . Acceptable nesting is:

    ...</p>

    Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, in HTML the <head> element must contain a <title> child element, lists require appropriate list items (<ul> and [list=1] require[*]; <dl> requires <dt> and <dd>), and so on.
    Error Line 213, Column 8: no document element

    </html>

  2. #2
    Moderatrice di CSS L'avatar di ResianTaxidrive
    Registrato dal
    Oct 2007
    residenza
    Udine
    Messaggi
    2,766

  3. #3
    Utente di HTML.it
    Registrato dal
    Jul 2006
    Messaggi
    3,072
    No!!! C'è:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
    <html>
    <head>

    ---

  4. #4
    Utente di HTML.it
    Registrato dal
    Jul 2006
    Messaggi
    3,072
    Perchè ottengo quegli errori

  5. #5
    Moderatrice di Grafica, Cerco e offro lavoro L'avatar di Myaku
    Registrato dal
    Nov 2006
    Messaggi
    10,349
    Originariamente inviato da Valeria75_bis
    Perchè ottengo quegli errori
    intanto, <html> da solo non basta con una dtd xhtml

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

    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">
    se poi ti da ancora errore, bisogna che ci posti il link della tua pagina


  6. #6
    Utente di HTML.it L'avatar di Prill
    Registrato dal
    Oct 2006
    Messaggi
    2,947

    Re: Validatzione HTML

    the DOCTYPE declaration will look like: "<!DOCTYPE html"
    non <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >

    via le maiuscole evidenziate in rosso

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 © 2025 vBulletin Solutions, Inc. All rights reserved.