Visualizzazione dei risultati da 1 a 5 su 5
  1. #1

    Problema Validazione: document type does not allow element "HTML" here

    Sto cercando di ridurre al minimo gli errori di validazione del sito http://www.questioner.it , tra gli ultimi errori rimasti ce ne sono alcuni che non riesco a comprendere, nello specifico ve ne propongo 1.

    L'errore è il seguente:

    Line 3, 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).

    ---

    Sottolineo che il problema non è nel comprendere il testo in lingua inglese relativo all'errore ma a trovare nella pratica la causa dell'errore. Grazie dell'aiuto.

  2. #2
    Frontend samurai L'avatar di fcaldera
    Registrato dal
    Feb 2003
    Messaggi
    12,924
    i meta vanno messi nell'<head>, non prima dell'elemento <html> (dove ci può andare al massimo il doctype)
    Vuoi aiutare la riforestazione responsabile?

    Iscriviti a Ecologi e inizia a rimuovere la tua impronta ecologica (30 alberi extra usando il referral)

  3. #3
    Si ho spostato la dichiarazione del charset all'interno dell'head e si è risolto.

    Per questo errore mi sapresti aiutare?

    Line 7, Column 60: document type does not allow element "META" here

    <meta name="keywords" content="domande,risposte,questioner">

    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).

  4. #4
    Frontend samurai L'avatar di fcaldera
    Registrato dal
    Feb 2003
    Messaggi
    12,924
    stai usando un doctype html transitional per cui non ti serve chiudere glie elementi con la slash (/>)
    Vuoi aiutare la riforestazione responsabile?

    Iscriviti a Ecologi e inizia a rimuovere la tua impronta ecologica (30 alberi extra usando il referral)

  5. #5
    Quindi tolgo solo lo slash così?

    <meta name "title" content="Questioner | Domande e risposte" >

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