Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 13
  1. #1

    3 errori col validatore w3c che non so risolvere...

    1) Unknown Parse Mode! The MIME Media Type () for this document is used to serve both SGML and XML based documents, and it is not possible to disambiguate it based on the DOCTYPE Declaration in your document. Parsing will continue in SGML mode

    che significa? cosa devo fare?
    la mia doctype declaration è la seguente:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//IT"
    "http://www.w3.org/TR/html4/loose.dtd">


    2) Error Line x column x: an attribute specification must start with a name or name token.
    <link="blue" vlink="purple">
    An attribute name (and some attribute values) must start with one of a restricted set of characters. This error usually indicates that you have failed to add a closing quotation mark on a previous attribute value (so the attribute value looks like the start of a new attribute) or have used an attribute that is not defined (usually a typo in a common attribute name).


    3) Error Line x column x: required attribute "TYPE" not specified.
    <style>
    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>.



    Error Line x column x: document type does not allow element "STYLE" here.
    <style>

    si riferisce a questa linea di codice che ho messo alla fine del body:

    <style>
    body { background: white url(nomefoto.jpg);}
    </style>

    che c'è di sbagliato??


    grazie
    O porti una soluzione, o fai parte del problema

  2. #2

  3. #3
    vero..

    ma anche se lo metto nella head, il validator mi riporta il seguente errore:

    Error Line x column x: required attribute "TYPE" not specified.
    <style>
    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
    O porti una soluzione, o fai parte del problema

  4. #4
    Bè, quest'ultimo è molto chiaro. Ti dice che ti manca l'attributo type. Di solito gli stili interni si scrivono così:
    codice:
    <style type="text/css"><!--
       body {
          /* proprieta' */
       }
       /* ... */
    --></style>

  5. #5
    giusto! corretto.. grazie

    restano i segueti errori:

    The MIME Media Type () for this document is used to serve both SGML and XML based documents, and it is not possible to disambiguate it based on the DOCTYPE Declaration in your document. Parsing will continue in SGML mode.

    This page is not Valid -//W3C//DTD HTML 4.01 Transitional//IT!
    Below are the results of attempting to parse this document with an SGML parser.

    Error Line x column x: an attribute specification must start with a name or name token.
    <link="blue" vlink="purple">
    An attribute name (and some attribute values) must start with one of a restricted set of characters. This error usually indicates that you have failed to add a closing quotation mark on a previous attribute value (so the attribute value looks like the start of a new attribute) or have used an attribute that is not defined (usually a typo in a common attribute name).



    Error Line x column x: document type does not allow element "LINK" here.
    <link="blue" vlink="purple">
    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).




    Consigli?
    grazie
    O porti una soluzione, o fai parte del problema

  6. #6
    Occhio che la DTD è scritta in maniera errata. Hai messo "IT" alla fine al posto di "EN"? Guarda che non è lì che si dichiara il linguaggio di pagina. Devi lasciare EN (che fa parte integrante della DTD); ecco una lista delle DTD valide:

    - www.w3.org/QA/2002/04/valid-dtd-list.html

    Poi, non capisco cosa sia "<link="blue" vlink="purple">": la sintassi è sbagliata.

  7. #7
    ok grazie, ho rimesso EN e va meglio (ma dove e come dichiaro che la pagina è in italiano? se metto <lang = "it"> mi segna errore)

    link e vlink stavano ad indicare che i link nella mia pagina compaiono in blu, e quando Visitati compaiono in color purple...

    mi sono accorto che la sintassi è sbagliata... ma quella giusta qual'è? :-)

    Grazie
    O porti una soluzione, o fai parte del problema

  8. #8
    up
    O porti una soluzione, o fai parte del problema

  9. #9
    UP, manca da risolvere il seguente errore:

    <link="blue" vlink="purple">


    Error Line x column x: an attribute specification must start with a name or name token.
    <link="blue" vlink="purple">
    An attribute name (and some attribute values) must start with one of a restricted set of characters. This error usually indicates that you have failed to add a closing quotation mark on a previous attribute value (so the attribute value looks like the start of a new attribute) or have used an attribute that is not defined (usually a typo in a common attribute name).


    aiuto grazie
    O porti una soluzione, o fai parte del problema

  10. #10
    Guarda bene il tuo codice:
    codice:
    <link="blue" vlink="purple">
    Stai dando un attributo al nome del tag, vedi? Adesso devi dirci cosa volevi fare: un tag <link>? Non credo. Forse impostare i colori dei tag <a>?

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.