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

    errore validazione pagina

    ciao,


    sto cercando di validare in locale una pagina.
    mi da un errore nella prima riga

    codice:
    Line 1 column 0: character "" not allowed in prolog.
    
    ���
    nell'editor però nella prima riga non c'è nulla di strano ( mi riferisco ai punti di domanda) e non ci sono righe vuote prima del doctype.

    però il validatore mi da la seguente nota:

    "The Unicode Byte-Order Mark (BOM) in UTF-8 encoded files is known to cause problems for some text editors and older browsers. You may want to consider avoiding its use until it is better supported."

    che cos'è il Unicode Byte-Order Mark (BOM)?

    e qual'è il problema?
    :master:

  2. #2

  3. #3
    l'errore è nella prima riga:

    codice:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    e uso un charset= UTF-8

    codice:
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

  4. #4
    Prova a postarci tutto il markup del documento.

  5. #5
    ah ok... però posso postare solo la parte dell'header dato che uso le inclusioni delle pagine php
    e cmq anche con le altre pagine l'errore è sempre e solo lì.

    codice:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    
    <title><?php echo $lang["titolo_sito"];?></title>
    
    
    <?php
    
    switch ($_GET['page']) {
    case 'fumetto1':
    case 'fumetto2':
    case 'fumetto3':
    case 'fumetto4':
    case 'fumetto5':
    case 'fumetto6':
    case 'fumetto7':
    case 'fumetto8':
    echo "<style type=\"text/css\">@import \"css/{$_SESSION['lingua']}_layout2.css\";</style>\n";
    break;
    default:
    echo "<style type=\"text/css\">@import \"css/{$_SESSION['lingua']}_layout.css\";</style>\n";
    }
    ?>
    <link rel="stylesheet" type="text/css" media="print" href="css/stampa.css" />
    <link rel="stylesheet" type="text/css" href="css/jsmenu.css" />
    <link rel="stylesheet" type="text/css" href="css/menu.css" />
    <link rel="stylesheet" type="text/css" href="css/news.css" />
    
    <script type="text/javascript" src="css/expandOne.js"></script>
    
    
    
    <script type="text/javascript">
    function closeoverlay() {
      document.getElementById('overlay').style.display = 'none';
    
    }
    function openoverlay() {
      document.getElementById('overlay').style.display = 'block';
    
    }
    
    
    </script>
    
    <link rel="stylesheet" type="text/css" href="css/anylink.css" />
    
    <?php
    
    switch ($_SESSION['lingua']) {
        case 'it':
    echo"<script type=\"text/javascript\" src=\"css/anylink.js\"></script>";
    break;
        case 'es':
    echo"<script type=\"text/javascript\" src=\"css/anylink_es.js\"></script>";
    break;
        case 'en':
    echo"<script type=\"text/javascript\" src=\"css/anylink_en.js\"></script>";
    break;
        case 'gr':
    echo"<script type=\"text/javascript\" src=\"css/anylink_gr.js\"></script>";
    break;
    }
    ?>
    
    </head>
    <body>
    	<div id="container">
    		<div id="banner">
    
      <div style="float:right;">
    
    <ul class="lang">[*][img]immagini/point.gif[/img] ita[*][img]immagini/point.gif[/img] eng[*][img]immagini/point.gif[/img] esp[*][img]immagini/point.gif[/img] ελλ[/list]
       </div>
        </div>
    va bene così?

  6. #6
    Ma non starai mica validando la pagina con dentro il codice PHP, vero? Stai validando l'output?

  7. #7
    ovvio sto validando l'output, ma in questo caso cosa cambia?

    ecco l'output


    codice:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    
    <title>pagina</title>
    
    
    <style type="text/css">@import "css/it_layout.css";</style>
    <link rel="stylesheet" type="text/css" media="print" href="css/stampa.css" />
    <link rel="stylesheet" type="text/css" href="css/jsmenu.css" />
    <link rel="stylesheet" type="text/css" href="css/menu.css" />
    <link rel="stylesheet" type="text/css" href="css/news.css" />
    
    <script type="text/javascript" src="css/expandOne.js"></script>
    
    
    
    <script type="text/javascript">
    function closeoverlay() {
      document.getElementById('overlay').style.display = 'none';
    
    }
    function openoverlay() {
      document.getElementById('overlay').style.display = 'block';
    
    }
    
    
    </script>
    
    <link rel="stylesheet" type="text/css" href="css/anylink.css" />
    
    <script type="text/javascript" src="css/anylink.js"></script>
    </head>
    <body>
    	<div id="container">
    		<div id="banner">
    
      <div style="float:right;">
    
    <ul class="lang">[*][img]immagini/point.gif[/img] ita[*][img]immagini/point.gif[/img] eng[*][img]immagini/point.gif[/img] esp
    [*][img]immagini/point.gif[/img] ελλ[/list]
       </div>
        </div>
    etc...il resto del codice..

    l'unica cosa di "strano" è che se visualizzo l'output della pagina, ci sono un ventina di righe vuote in alto prima del doctype.... :master:

  8. #8
    Utente di HTML.it
    Registrato dal
    Jun 2006
    Messaggi
    61

    validatore html aiuto!!!!!

    validatore html
    Salve Raga volevo sapere se in giro per il web esista qualche tool che permetta di analizzare e correggere in automatico il codice html.
    Io gestisco 5 siti web e in tutti e cinque quando vado a fare la scansione con il servizio di http://validator.w3.org/ mi da errori, ma siccome non ci capisco nulla e devo sbrigarmela da solo vorrei trovare qualcosa che in qualche modo mi aiuti. Grazie anticipatamente!!! Buona navigazione a tutti e complimenti a http://www.html.it
    Ciao a presto

  9. #9
    Utente di HTML.it
    Registrato dal
    Jun 2006
    Messaggi
    61

    problemi riscontrati

    Se qualcuno mi vuole aiutare il risultato della scansione fatta è questo:
    Error Line 46 column 32: required attribute "TYPE" not specified.
    <SCRIPT LANGUAGE="JavaScript1.1">
    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 75 column 55: "HREF" is not a member of a group specified for any attribute.
    ... <td><a style="cursor:hand" href onClick="this.style.behavior='url(#defau


    Error Line 76 column 44: there is no attribute "ALT".
    ...="Imposta come Pagina Iniziale." alt="Imposta come Pagina Iniziale."><img src
    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.



    Error Line 76 column 138: required attribute "ALT" not specified.
    ...if" width="23" height="21" border="0"></a></td>


    Error Line 78 column 288: required attribute "ALT" not specified.
    ...if" width="22" height="21" border="0"></a></td>


    Error Line 89 column 23: end tag for element "DIV" which is not open.
    </div></td>
    The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

    If this error occured in a script section of your document, you should probably read this FAQ entry.



    Error Line 125 column 49: there is no attribute "CLASS".
    <td class="top_img_bar_down" ><marquee class="top_menu" scrollamount="3" >


    Error Line 125 column 73: there is no attribute "SCROLLAMOUNT".
    ...wn" ><marquee class="top_menu" scrollamount="3" >


    Error Line 125 column 77: element "MARQUEE" undefined.
    ...rquee class="top_menu" scrollamount="3" >
    You have used the element named above in your document, but the document type you are using does not define an element of that name. 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 "Frameset" document type to get the "<frameset>" element),
    by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
    by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case.



    Error Line 322 column 15: there is no attribute "SRC".
    <embed src="/swf/news.swf" quality="high" pluginspage="http://www.macromedia


    Error Line 322 column 39: there is no attribute "QUALITY".
    <embed src="/swf/news.swf" quality="high" pluginspage="http://www.macromedia


    Error Line 322 column 58: there is no attribute "PLUGINSPAGE".
    ...news.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashpl


    Error Line 322 column 109: there is no attribute "TYPE".
    ...cromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="1


    Error Line 322 column 147: there is no attribute "WIDTH".
    ...application/x-shockwave-flash" width="175" height="80"></embed>


    Error Line 322 column 160: there is no attribute "HEIGHT".
    ...-shockwave-flash" width="175" height="80"></embed>


    Error Line 322 column 164: element "EMBED" undefined.
    ...ckwave-flash" width="175" height="80"></embed>


    Error Line 324 column 3: end tag for element "P" which is not open.
    </p>


    Error Line 650 column 29: value of attribute "ALIGN" cannot be "ABSMIDDLE"; must be one of "TOP", "MIDDLE", "BOTTOM", "LEFT", "RIGHT".
    ALT="Google" align="absmiddle">
    </A>
    The value of the attribute is defined to be one of a list of possible values but in the document it contained something that is not allowed for that type of attribute. For instance, the “selected” attribute must be either minimized as “selected” or spelled out in full as “selected="selected"”; a value like “selected="true"” is not allowed.



    Error Line 667 column 29: required attribute "TYPE" not specified.
    <script language="JavaScript">


    Error Line 687 column 87: required attribute "ALT" not specified.
    ...1" border="0" width="150" height="75">
    </a>


    Error Line 689 column 168: required attribute "ALT" not specified.
    ...0" longdesc="http://www.frisella.it" /></a>


    Error Line 721 column 120: end tag for element "B" which is not open.
    ...costruzione. [/b] </p>


    Error Line 740 column 93: end tag for element "B" which is not open.
    ...dipendente. [/b] </p>


    Error Line 742 column 116: invalid comment declaration: found name character outside comment but inside comment declaration.
    ...id=800&titolo=VENDITA-VILLA-SALENTO---VENDITA-VILLE-NEL-SALENTO" >


    Info Line 742 column 22: comment declaration started here.
    <!-- <a href="/ita/case-nel-salento/immobile-salento.php?i
    Error Line 757 column 123: end tag for element "B" which is not open.
    ...vista mare. [/b] </p>


    Error Line 774 column 83: end tag for element "B" which is not open.
    ... Torre Vado. [/b] </p>


    Error Line 801 column 39: non SGML character number 147.
    Leuca: Complesso ¼/strong>?Case Salento” è il luogo ideale dove
    You have used an illegal character in your text. HTML uses the standard UNICODE Consortium character repertoire, and it leaves undefined (among others) 65 character codes (0 to 31 inclusive and 127 to 159 inclusive) that are sometimes used for typographical quote marks and similar in proprietary character sets. The validator has found one of these undefined characters in your document. The character may appear on your browser as a curly quote, or a trademark symbol, or some other fancy glyph; on a different computer, however, it will likely appear as a completely different character, or nothing at all.

    Your best bet is to replace the character with the nearest equivalent ASCII character, or to use an appropriate character entity. For more information on Character Encoding on the web, see Alan Flavell's excellent HTML Character Set Issues reference.

    This error can also be triggered by formatting characters embedded in documents by some word processors. If you use a word processor to edit your HTML documents, be sure to use the "Save as ASCII" or similar command to save the document without formatting information.



    Error Line 801 column 52: non SGML character number 148.
    ... Leuca: Complesso “Case Salento” è il luogo ideale dove trascorrere


    Error Line 802 column 27: end tag for element "B" which is not open.


    [/b] <!-- <a href="/ita/case-nel-salento/immobile-salent


    Error Line 818 column 27: end tag for element "B" which is not open.


    [/b] <!-- <a href="/ita/case-nel-salento/immobile-salent


    Error Line 833 column 250: required attribute "ALT" not specified.
    ...9" hspace="5" border="0" align="left"></a>Salento[/b], dove il sole ed i


    Error Line 882 column 235: required attribute "ALT" not specified.
    ...1ani.gif" border=0 width=88 height=31></a> | <a title="Un portale dedicato al


    Error Line 890 column 82: required attribute "ALT" not specified.
    ...8x31.gif" width=88 height=31 border=0></a> | <A title="Il motore di ricerca a


    Warning Line 907 column 116: cannot generate system identifier for general entity "q".
    ....com<WBR>/exchange/exit.php?id=60837&q<WBR>=821&btn=on">
    An entity reference was found in the document, but there is no reference by that name defined. Often this is caused by misspelling the reference name, unencoded ampersands, or by leaving off the trailing semicolon (. The most common cause of this error is unencoded ampersands in URLs as described by the WDG in "Ampersands in URLs".

    Entity references start with an ampersand (&) and end with a semicolon (. If you want to use a literal ampersand in your document you must encode it as "&amp;" (even inside URLs!). Be careful to end entity references with a semicolon or your entity reference may get interpreted in connection with the following text. Also keep in mind that named entity references are case-sensitive; &Aelig; and &aelig; are different characters.

    If this error appears in some markup generated by PHP's session handling code, this article has explanations and solutions to your problem.

    Note that in most documents, errors related to entity references will trigger up to 5 separate messages from the Validator. Usually these will all disappear when the original problem is fixed.



    Error Line 907 column 116: general entity "q" not defined and no default entity.
    ....com<WBR>/exchange/exit.php?id=60837&q<WBR>=821&btn=on">
    This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details.



    Error Line 907 column 117: reference to entity "q" for which no system identifier could be generated.
    ...com<WBR>/exchange/exit.php?id=60837&q<WBR>=821&btn=on">
    This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details.



    Info Line 907 column 115: entity was defined here.
    ...p.com<WBR>/exchange/exit.php?id=60837&q<WBR>=821&btn=on">
    Warning Line 907 column 127: cannot generate system identifier for general entity "btn".
    ...xchange/exit.php?id=60837&q<WBR>=821&btn=on">


    Error Line 907 column 127: general entity "btn" not defined and no default entity.
    ...xchange/exit.php?id=60837&q<WBR>=821&btn=on">


    Error Line 907 column 130: reference to entity "btn" for which no system identifier could be generated.
    ...ange/exit.php?id=60837&q<WBR>=821&btn=on">


    Info Line 907 column 126: entity was defined here.
    ...exchange/exit.php?id=60837&q<WBR>=821&btn=on">
    Error Line 917 column 151: required attribute "ALT" not specified.
    ...g" width="128" height="30" border="0"></a>



    Error Line 942 column 11: ID "META_BOTTOM" already defined.
    <div id="meta_bottom">salento vacanze Torre San Giovanni, Lido Marini, Torre P
    An "id" is a unique identifier. Each time this attribute is used in a document it must have a different value. If you are using this attribute as a hook for style sheets it may be more appropriate to use classes (which group elements) than id (which are used to identify exactly one element).



    Info Line 941 column 9: ID "META_BOTTOM" first defined here.
    <div id="meta_bottom">

  10. #10
    Prova a fare una ricerca tra le vecchie discussioni. Qui si affrontano spesso le correzioni legate alla validazione e sono sicuro che molti errori potrai analizzarli, comprenderli e correggerli da solo.

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.