Visualizzazione dei risultati da 1 a 7 su 7
  1. #1
    Utente di HTML.it
    Registrato dal
    Sep 2001
    residenza
    Napoli, Italia
    Messaggi
    1,074

    Strani errori in validazione W3C

    Ho fatto un test di valutazione W3C, su una pagina tipo di un sito che sto sviluppando.
    Però mi dà una serie di errori che non capisco...
    [list=1][*]Line 2, Column 13: Attribute "XMLNS" is not a valid attribute. Did you mean "onmouseup" or "onmouseover"?
    <html xmlns="http://www.w3.org/1999/xhtml">[*]Line 3, Column 6: document type does not allow element "HTML" here
    <html><head><title>I.T.C. 'Rocco Scotellaro'</title>[*]Line 5, Column 18: Attribute "LANGUAGE" is not a valid attribute. Did you mean "language"?
    <script language="JavaScript" type="text/JavaScript">[*]Line 51, Column 18: Attribute "HEIGHT" is not a valid attribute. Did you mean "height"?
    <tr height="198">[*]Line 52, Column 19: Attribute "WIDTH" is not a valid attribute. Did you mean "width"?
    <td width="237" class="topleft"></td>[*]Line 122, Column 146: Attribute "BORDER" is not a valid attribute. Did you mean "border"?
    …if" width="192" height="104" border="0" usemap="#Map" alt="Contatta l'ITC R. [*]Line 124, Column 62: required attribute "ALT" not specified
    … shape="rect" coords="11,9,183,61" href="contatti.php">[*]Line 131, Column 49: Attribute "BGCOLOR" is not a valid attribute. Did you mean "bgcolor"?
    …align="center" valign="top" bgcolor="#f5df87"><table width="90%" border="0" c[*]Line 146, Column 32: Attribute "HEIGHT" is not a valid attribute. Did you mean "height"?
    <table width="100%" height="47" border="0" cellspacing="0" cellpadding="0">[*]Line 151, Column 65: Attribute "TARGET" is not a valid attribute. Did you mean "target"?
    …eveoplment: <a href="http://www.metatad.it" target="_blank">[b]studio [*]Line 159, Column 8: "HTML" not finished but document ended
    </ht…[/list=1]
    In particolare, gli errori 3,4,5,6,8,9,10 sembrano essere relativi al fatto che - dice il validatore - quegli attributi sono scritti in maiuscolo, ma invece sono minuscoli...
    E poi, perchè mi dà quegli errori 1,2 e 11?
    E perchè - errore 7 - mi chiede l'attributo ALT per la mappa d'immagine?
    Il testo è stato fatto sul sito W3C: http://validator.w3.org/check?uri=http%3A%2F%2F....
    metatad
    graphic & web design

  2. #2

    Re: Strani errori in validazione W3C

    Gli errori di minuscolo non saprei sinceramente, il codice html va scritto in minuscolo e cosi hai fatto, che software usi per scrivere il codice?
    Poi per la mappa dell'immagine credo che l'attributo alt sia necessario per rendere più chiara la navigazione, mettilo che non costa niente ed effettivamente è più chiaro..puoi postare il codice della pagina intera o un link?

  3. #3
    Utente di HTML.it
    Registrato dal
    Sep 2001
    residenza
    Napoli, Italia
    Messaggi
    1,074
    metatad
    graphic & web design

  4. #4
    il primo errore ti dice che dichiari il doctype dell'html,
    ma poi alla seconda riga indichi i namespaces del xhtml (dovresti cancellarla)

    il secondo errore è conseguenza del primo, perchè indichi di nuovo l'inizio del documento

    tutti gli altri errori (riguardo le maiuscole) derivano dal fatto che hai richiamato i namespaces xhtml,
    che prevede che tutto (tag e attributi) sia scritto in minuscolo,
    mentre nell'html "normale" i tag vanno scritti in maiuscolo e gli attributi in minuscolo

  5. #5
    Utente di HTML.it
    Registrato dal
    Sep 2001
    residenza
    Napoli, Italia
    Messaggi
    1,074
    Ho provato a togliere la seconda riga
    Codice PHP:
    <html xmlns="http://www.w3.org/1999/xhtml"
    e rifare il test di validazione. Continua a chiedermi di scrivere gli attributi in minuscolo, anche se effettivamente sono già così...
    metatad
    graphic & web design

  6. #6
    Allora, tu hai scelto come DOCTYPE l'HTML 4.01 STRICT ...
    Quindi:

    # Line 5, Column 18: Attribute "LANGUAGE" is not a valid attribute. Did you mean "language"?
    <script language="JavaScript" type="text/JavaScript">
    in HTML 4.01 strict non esiste l'attributo language
    # Line 51, Column 18: Attribute "HEIGHT" is not a valid attribute. Did you mean "height"?
    <tr height="198">
    in HTML 4.01 strict non esiste, per una <tr>, l'attributo height
    # Line 52, Column 19: Attribute "WIDTH" is not a valid attribute. Did you mean "width"?
    <td width="237" class="topleft"> </td>
    in HTML 4.01 strict non esiste, per una <td>, l'attributo width
    # Line 122, Column 146: Attribute "BORDER" is not a valid attribute. Did you mean "border"?
    …if" width="192" height="104" border="0" usemap="#Map" alt="Contatta l'ITC R.
    in HTML 4.01 strict non esiste, per una <img>, l'attributo border
    # Line 124, Column 62: required attribute "ALT" not specified
    … shape="rect" coords="11,9,183,61" href="contatti.php">
    in HTML 4.01 strict le <img>devono sempre avere l'attributo alt
    # Line 131, Column 49: Attribute "BGCOLOR" is not a valid attribute. Did you mean "bgcolor"?
    …align="center" valign="top" bgcolor="#f5df87"><table width="90%" border="0" c
    in HTML 4.01 strict non esiste, per una <td>, l'attributo bgcolor
    # Line 146, Column 32: Attribute "HEIGHT" is not a valid attribute. Did you mean "height"?
    <table width="100%" height="47" border="0" cellspacing="0" cellpadding="0">
    in HTML 4.01 strict non esiste, per una <table>, l'attributo height
    # Line 151, Column 65: Attribute "TARGET" is not a valid attribute. Did you mean "target"?
    …eveoplment: <a href="http://www.metatad.it" target="_blank">[b]studio
    in HTML 4.01 strict non esiste, per una <a>, l'attributo target

    Controlla QUI gli attributi che puoi usare ...

    HTH
    Zappa
    [PC:Presario 2515EU][Cpu:P4@2.3GHz][Ram: 512M][HDU:80G@5400 RPM]
    [Wireless:LinkSys][OS: Ubuntu 9.04 - Jaunty Jackalope]

  7. #7
    Utente di HTML.it
    Registrato dal
    Sep 2001
    residenza
    Napoli, Italia
    Messaggi
    1,074
    Grazie per il link, adesso mi verifico tutto...
    metatad
    graphic & web design

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.