IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

HTML Discussion :

Validation W3C Compréhension [W3C]


Sujet :

HTML

  1. #1
    Membre habitué Avatar de fazpedro
    Homme Profil pro
    Inscrit en
    Août 2009
    Messages
    504
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Août 2009
    Messages : 504
    Points : 128
    Points
    128
    Par défaut Validation W3C Compréhension
    Bonjour,
    je ne comprends pas pourquoi ma page n'est pas validé par le W3C :
    voici mes codes et les messages d'erreur de la page de validation,
    merci de votre aide.
    PS : je suis débutant...

    index.php :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    <?php include('bandeau.php'); ?> <!-- insère le bandeau principal en haut -->
    <?php include('lateral_gauche.php'); ?> <!-- insère le côté gauche -->
    <?php include('bas_de_page.php'); ?> <!-- insère le bas de page  -->
    Bandeau.php :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
    <head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />	
    <title>MON SITE</title>
    <link rel="stylesheet" type="text/css" href="style.css" />
    </head>
    <body>
    <div id="haut">
    		<div id="en_tete">
    			<img src="image.jpeg" alt="image du site"title="Perdu?" />
    			<h2> Le site des sorties</h2>
    		</div>
    		<ul id="tabnav">
    			<li><a href="index.php">Accueil</a></li>
    			<li><a href="agenda.php">Recherche_Agenda</a></li>
    			<li><a href="annoncer.php">Annoncer un &eacute;v&egrave;nenement</a></li>
    			<li><a href="morceaux.php">Morceaux de la semaine</a></li>			
    			<li><a href="liens.php">Liens</a></li>
    			<li><a href="contact.php">Nous contacter</a></li>
    			<li><a href="newsletter.php">Newsletter</a></li>
    		</ul>
    </div>
    </body>
    </html>
    bas_de_page.php :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
    <head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />	
    <title>MON SITE</title>
    <link rel="stylesheet" type="text/css" href="style.css" />
    </head>
    <body>
    <div id="mainContent">
    <br />
    <br />
    <a href="#haut">Haut de page</a>
    <br />
    <br />
    </div>
    <div id="footer">
    <p>Copyleft 2011</p>
    </div>
    </body>
    </html>
    lateral_gauche.php :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
    <head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />	
    <title>MON SITE</title>
    <link rel="stylesheet" type="text/css" href="style.css" />
    </head>
    <body>
    <div id="maincontent">
    </div>
    <?php require("recherche_pour_news.php"); ?>
    </div>
    </body>
    </html>
    recherche_pour_news.php :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
    <head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />	
    <title>MON SITE</title>
    <link rel="stylesheet" type="text/css" href="style.css" />
    </head>
    <body>
     
     
     
    </body>
     
    </html>
    Validation par W3C :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    Validation Output: 34 Errors
     
        Error Line 34, Column 3: "DOCTYPE" declaration not allowed in instance
     
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     
        ?
        Error Line 36, Column 67: document type does not allow element "html" here
     
        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
     
        ?
     
        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 48, Column 3: "DOCTYPE" declaration not allowed in instance
     
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     
        ?
        Error Line 50, Column 67: document type does not allow element "html" here
     
        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
     
        ?
     
        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 58, Column 44: document type does not allow element "b" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
     
        …strong>A la une</strong></h3><p></p><b>Retrouvez tous les nouveaux évènements …
     
        ?
     
        The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
     
        One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
        Error Line 58, Column 101: document type does not allow element "br" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
     
        … nouveaux évènements de ce jour</b><br></br>Ajourd'hui&nbsp;<b>Mardi 21 Juin&n…
     
        ?
     
        The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
     
        One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
        Error Line 58, Column 107: character data is not allowed here
     
        …aux évènements de ce jour</b><br></br>Ajourd'hui&nbsp;<b>Mardi 21 Juin&nbsp;&n…
     
        ?
     
        You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include:
            putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>), or
            forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes), or
            using XHTML-style self-closing tags (such as <meta ... />) in HTML 4.01 or earlier. To fix, remove the extra slash ('/') character. For more information about the reasons for this, see Empty elements in SGML, HTML, XML, and XHTML.
        Error Line 58, Column 125: document type does not allow element "b" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
     
        …ce jour</b><br></br>Ajourd'hui&nbsp;<b>Mardi 21 Juin&nbsp;&nbsp;</b><br></br><…
     
        ?
     
        The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
     
        One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
        Error Line 58, Column 158: document type does not allow element "br" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
     
        …sp;<b>Mardi 21 Juin&nbsp;&nbsp;</b><br></br><p><b>Aucun &eacute;v&egrave;nemen…
     
        ?
     
        The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
     
        One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
        Error Line 58, Column 213: document type does not allow element "br" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
     
        … &eacute;v&egrave;nement ! </b></p><br></br><a href="#haut">Haut de page</a><b…
     
        ?
     
        The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
     
        One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
        Error Line 58, Column 234: document type does not allow element "a" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
     
        …ent ! </b></p><br></br><a href="#haut">Haut de page</a><br></br><h3><strong>Ce…
     
        ?
     
        The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
     
        One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
        Error Line 58, Column 254: document type does not allow element "br" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
     
        …br><a href="#haut">Haut de page</a><br></br><h3><strong>Cette semaine</strong>…
     
        ?
     
        The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
     
        One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
        Error Line 58, Column 308: document type does not allow element "b" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
     
        …g>Cette semaine</strong></h3><p></p><b>Retrouvez tous les nouveaux évènements …
     
        ?
     
        The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
     
        One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
        Error Line 58, Column 371: document type does not allow element "br" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
     
        …aux évènements de cette semaine</b><br></br>Du <b>Mardi 21 Juin&nbsp;&nbsp;</b…
     
        ?
     
        The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
     
        One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
        Error Line 58, Column 377: character data is not allowed here
     
        …ènements de cette semaine</b><br></br>Du <b>Mardi 21 Juin&nbsp;&nbsp;</b>Au <b…
     
        ?
     
        You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include:
            putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>), or
            forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes), or
            using XHTML-style self-closing tags (such as <meta ... />) in HTML 4.01 or earlier. To fix, remove the extra slash ('/') character. For more information about the reasons for this, see Empty elements in SGML, HTML, XML, and XHTML.
        Error Line 58, Column 382: document type does not allow element "b" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
     
        …nts de cette semaine</b><br></br>Du <b>Mardi 21 Juin&nbsp;&nbsp;</b>Au <b>Mard…
     
        ?
     
        The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
     
        One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
        Error Line 58, Column 412: character data is not allowed here
     
        …br>Du <b>Mardi 21 Juin&nbsp;&nbsp;</b>Au <b>Mardi 28 Juin&nbsp;&nbsp;</b><p></…
     
        ?
     
        You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include:
            putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>), or
            forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes), or
            using XHTML-style self-closing tags (such as <meta ... />) in HTML 4.01 or earlier. To fix, remove the extra slash ('/') character. For more information about the reasons for this, see Empty elements in SGML, HTML, XML, and XHTML.
        Error Line 58, Column 417: document type does not allow element "b" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
     
        … <b>Mardi 21 Juin&nbsp;&nbsp;</b>Au <b>Mardi 28 Juin&nbsp;&nbsp;</b><p></p><b>…
     
        ?
     
        The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
     
        One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
        Error Line 58, Column 456: document type does not allow element "b" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
     
        …Mardi 28 Juin&nbsp;&nbsp;</b><p></p><b><div class='recherche'>Concert   </b></…
     
        ?
     
        The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
     
        One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
        Error Line 58, Column 479: document type does not allow element "div" here; missing one of "object", "ins", "del", "map", "button" start-tag
     
        …p;</b><p></p><b><div class='recherche'>Concert   </b></div><p></p><div class='…
    
        ?
    
        The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
     
        One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
        Error Line 58, Column 493: end tag for "div" omitted, but OMITTAG NO was specified
     
        …b><div class='recherche'>Concert   </b></div><p></p><div class='recherche'>   …
     
        ?
     
        You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
        Info Line 58, Column 457: start tag was here
     
        …ardi 28 Juin&nbsp;&nbsp;</b><p></p><b><div class='recherche'>Concert   </b></d…
     
        Error Line 58, Column 499: end tag for element "div" which is not open
     
    class='recherche'>Concert   </b></div><p></p><div class='recherche'>    > Sal…
     
        ?
     
        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 occurred in a script section of your document, you should probably read this FAQ entry.
        Error Line 58, Column 560: document type does not allow element "b" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
     
        …herche'>    > Salle_Concert   </div><b><div class='recherche'>    > mercredi 2…
     
        ?
     
        The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
     
        One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
        Error Line 58, Column 583: document type does not allow element "div" here; missing one of "object", "ins", "del", "map", "button" start-tag
     
        …cert   </div><b><div class='recherche'>    > mercredi 22 juin   </b></div><div…
     
        ?
     
        The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
     
        One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
        Error Line 58, Column 612: end tag for "div" omitted, but OMITTAG NO was specified
     
        …echerche'>    > mercredi 22 juin   </b></div><div class='recherche'>    > Aggl…
     
        ?
     
        You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
        Info Line 58, Column 561: start tag was here
     
        …erche'>    > Salle_Concert   </div><b><div class='recherche'>    > mercredi 22…
     
        Error Line 58, Column 618: end tag for element "div" which is not open
     
        …he'>    > mercredi 22 juin   </b></div><div class='recherche'>    > Agglomérat…
     
        ?
     
        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 occurred in a script section of your document, you should probably read this FAQ entry.
        Error Line 58, Column 816: document type does not allow element "b" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
     
        …ass='recherche'> où ? Le QG   </div><b><div class='recherche'> qui ? Dub In Vo…
     
        ?
     
        The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
     
        One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
        Error Line 58, Column 839: document type does not allow element "div" here; missing one of "object", "ins", "del", "map", "button" start-tag
     
        …e QG   </div><b><div class='recherche'> qui ? Dub In Vo   </b></div><p></p><di…
     
        ?
     
        The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
     
        One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
        Error Line 58, Column 862: end tag for "div" omitted, but OMITTAG NO was specified
     
        …ass='recherche'> qui ? Dub In Vo   </b></div><p></p><div class='recherche'>   …
     
        ?
     
        You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
        Info Line 58, Column 817: start tag was here
     
        …ss='recherche'> où ? Le QG   </div><b><div class='recherche'> qui ? Dub In Vo …
     
        Error Line 58, Column 868: end tag for element "div" which is not open
     
        …echerche'> qui ? Dub In Vo   </b></div><p></p><div class='recherche'>      < d…
     
        ?
     
        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 occurred in a script section of your document, you should probably read this FAQ entry.
        Warning Line 58, Column 905: character "<" is the first character of a delimiter but occurred as data
     
        …iv><p></p><div class='recherche'>      < dub in vo en concert   </div><br></br>
     
        ?
     
        This message may appear in several cases:
            You tried to include the "<" character in your page: you should escape it as "&lt;"
            You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
            Another possibility is that you forgot to close quotes in a previous tag.
        Error Line 58, Column 939: document type does not allow element "br" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
     
        …iv><p></p><div class='recherche'>      < dub in vo en concert   </div><br></br>
     
        ?
     
        The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
     
        One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
        Error Line 63, Column 6: end tag for element "div" which is not open
     
        </div>
     
        ?
     
        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 occurred in a script section of your document, you should probably read this FAQ entry.
        Error Line 70, Column 3: "DOCTYPE" declaration not allowed in instance
     
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     
        ?
        Error Line 72, Column 67: document type does not allow element "html" here
     
        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
     
        ?
     
        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).

  2. #2
    Expert éminent
    Avatar de 12monkeys
    Homme Profil pro
    Webmaster
    Inscrit en
    Novembre 2006
    Messages
    4 093
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : France, Puy de Dôme (Auvergne)

    Informations professionnelles :
    Activité : Webmaster
    Secteur : Service public

    Informations forums :
    Inscription : Novembre 2006
    Messages : 4 093
    Points : 9 031
    Points
    9 031
    Par défaut
    Bonjour

    Ta page web doit avoir une structure tel que indiquée ici : http://j-willette.developpez.com/tut...ge=page_1#LI-B, c'est à dire un doctype, un seul couple de balises <html></html>, un seul couple de balises <head></head>, un seul couple de balises <body></body>...

    Or tu as fait cette structure dans chaque page incluse, ceci est faux.

    Mets plutôt le doctype, le <html>, le <head>, le <body> dans index.php et tu inclus ensuite tes fichiers PHP mais avec uniquement le strict nécessaire, pas toutes les balises citées plus haut.

    Une fois ta page affichée dans le navigateur, si tu regardes le code source il ne faut pas que tu ais plusieurs doctypes par exemple.
    Vous souhaitez participer à la rubrique (X)HTML/CSS, contactez moi.
    débutez avec les CSS
    Pas de MP pour des questions techniques ! Mode d'emploi du forum ; Règles ; Pensez à la balise code ; Pas de SMS !
    Votez pour les messages qui vous ont aidés...

  3. #3
    Modérateur
    Avatar de Bisûnûrs
    Profil pro
    Développeur Web
    Inscrit en
    Janvier 2004
    Messages
    9 868
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Janvier 2004
    Messages : 9 868
    Points : 16 258
    Points
    16 258
    Par défaut
    Voici un exemple complet de ce qu'il faut et ne faut pas faire :
    http://www.developpez.net/forums/d10...g/#post6010498

  4. #4
    Membre habitué Avatar de fazpedro
    Homme Profil pro
    Inscrit en
    Août 2009
    Messages
    504
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Août 2009
    Messages : 504
    Points : 128
    Points
    128
    Par défaut
    j'ai laissé le DOCTYPE dans bandeau.php et maintenant j'ai les erreurs suivantes :
    Validation Output: 45 Errors

    Error Line 60, Column 4: document type does not allow element "h3" here

    <h3><strong>A la une</strong></h3><p></p><b>Retrouvez tous les nouveaux évèneme…



    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 60, Column 37: document type does not allow element "p" here

    <h3><strong>A la une</strong></h3><p></p><b>Retrouvez tous les nouveaux évèneme…



    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 60, Column 44: document type does not allow element "b" here

    …strong>A la une</strong></h3><p></p><b>Retrouvez tous les nouveaux évènements …



    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 60, Column 101: document type does not allow element "br" here

    … nouveaux évènements de ce jour</b><br></br>Ajourd'hui&nbsp;<b>Mardi 21 Juin&n…



    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 60, Column 107: character data is not allowed here

    …aux évènements de ce jour</b><br></br>Ajourd'hui&nbsp;<b>Mardi 21 Juin&nbsp;&n…



    You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include:
    putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>), or
    forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes), or
    using XHTML-style self-closing tags (such as <meta ... />) in HTML 4.01 or earlier. To fix, remove the extra slash ('/') character. For more information about the reasons for this, see Empty elements in SGML, HTML, XML, and XHTML.
    Error Line 60, Column 117: entity reference illegal after document element

    …ents de ce jour</b><br></br>Ajourd'hui&nbsp;<b>Mardi 21 Juin&nbsp;&nbsp;</b><b…


    Error Line 60, Column 123: end of entity other than document entity after document element

    …e ce jour</b><br></br>Ajourd'hui&nbsp;<b>Mardi 21 Juin&nbsp;&nbsp;</b><br></br…


    Error Line 60, Column 125: document type does not allow element "b" here

    …ce jour</b><br></br>Ajourd'hui&nbsp;<b>Mardi 21 Juin&nbsp;&nbsp;</b><br></br><…



    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 60, Column 158: document type does not allow element "br" here

    …sp;<b>Mardi 21 Juin&nbsp;&nbsp;</b><br></br><p><b>Aucun &eacute;v&egrave;nemen…



    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 60, Column 166: document type does not allow element "p" here

    …rdi 21 Juin&nbsp;&nbsp;</b><br></br><p><b>Aucun &eacute;v&egrave;nement ! </b>…



    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 60, Column 213: document type does not allow element "br" here

    … &eacute;v&egrave;nement ! </b></p><br></br><a href="#haut">Haut de page</a><b…



    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 60, Column 234: document type does not allow element "a" here

    …ent ! </b></p><br></br><a href="#haut">Haut de page</a><br></br><h3><strong>Ce…



    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 60, Column 254: document type does not allow element "br" here

    …br><a href="#haut">Haut de page</a><br></br><h3><strong>Cette semaine</strong>…



    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 60, Column 263: document type does not allow element "h3" here

    …f="#haut">Haut de page</a><br></br><h3><strong>Cette semaine</strong></h3><p><…



    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 60, Column 301: document type does not allow element "p" here

    …><strong>Cette semaine</strong></h3><p></p><b>Retrouvez tous les nouveaux évèn…



    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 60, Column 308: document type does not allow element "b" here

    …g>Cette semaine</strong></h3><p></p><b>Retrouvez tous les nouveaux évènements …



    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 60, Column 371: document type does not allow element "br" here

    …aux évènements de cette semaine</b><br></br>Du <b>Mardi 21 Juin&nbsp;&nbsp;</b…



    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 60, Column 377: character data is not allowed here

    …ènements de cette semaine</b><br></br>Du <b>Mardi 21 Juin&nbsp;&nbsp;</b>Au <b…



    You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include:
    putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>), or
    forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes), or
    using XHTML-style self-closing tags (such as <meta ... />) in HTML 4.01 or earlier. To fix, remove the extra slash ('/') character. For more information about the reasons for this, see Empty elements in SGML, HTML, XML, and XHTML.
    Error Line 60, Column 382: document type does not allow element "b" here

    …nts de cette semaine</b><br></br>Du <b>Mardi 21 Juin&nbsp;&nbsp;</b>Au <b>Mard…



    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 60, Column 412: character data is not allowed here

    …br>Du <b>Mardi 21 Juin&nbsp;&nbsp;</b>Au <b>Mardi 28 Juin&nbsp;&nbsp;</b><p></…



    You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include:
    putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>), or
    forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes), or
    using XHTML-style self-closing tags (such as <meta ... />) in HTML 4.01 or earlier. To fix, remove the extra slash ('/') character. For more information about the reasons for this, see Empty elements in SGML, HTML, XML, and XHTML.
    Error Line 60, Column 417: document type does not allow element "b" here

    … <b>Mardi 21 Juin&nbsp;&nbsp;</b>Au <b>Mardi 28 Juin&nbsp;&nbsp;</b><p></p><b>…



    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 60, Column 449: document type does not allow element "p" here

    …>Au <b>Mardi 28 Juin&nbsp;&nbsp;</b><p></p><b><div class='recherche'>Concert …



    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 60, Column 456: document type does not allow element "b" here

    …Mardi 28 Juin&nbsp;&nbsp;</b><p></p><b><div class='recherche'>Concert </b></…



    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 60, Column 479: document type does not allow element "div" here; missing one of "object", "ins", "del", "map", "button" start-tag

    …p;</b><p></p><b><div class='recherche'>Concert </b></div><p></p><div class='…



    The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

    One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
    Error Line 60, Column 493: end tag for "div" omitted, but OMITTAG NO was specified

    …b><div class='recherche'>Concert </b></div><p></p><div class='recherche'> …



    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
    Info Line 60, Column 457: start tag was here

    …ardi 28 Juin&nbsp;&nbsp;</b><p></p><b><div class='recherche'>Concert </b></d…

    Error Line 60, Column 499: end tag for element "div" which is not open

    … class='recherche'>Concert </b></div><p></p><div class='recherche'> > Sal…



    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 occurred in a script section of your document, you should probably read this FAQ entry.
    Error Line 60, Column 502: document type does not allow element "p" here

    …ass='recherche'>Concert </b></div><p></p><div class='recherche'> > Salle_…



    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 60, Column 529: document type does not allow element "div" here

    …/b></div><p></p><div class='recherche'> > Salle_Concert </div><b><div cla…



    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 60, Column 560: document type does not allow element "b" here

    …herche'> > Salle_Concert </div><b><div class='recherche'> > mercredi 2…



    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 60, Column 583: document type does not allow element "div" here; missing one of "object", "ins", "del", "map", "button" start-tag

    …cert </div><b><div class='recherche'> > mercredi 22 juin </b></div><div…



    The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

    One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
    Error Line 60, Column 612: end tag for "div" omitted, but OMITTAG NO was specified

    …echerche'> > mercredi 22 juin </b></div><div class='recherche'> > Aggl…



    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
    Info Line 60, Column 561: start tag was here

    …erche'> > Salle_Concert </div><b><div class='recherche'> > mercredi 22…

    Error Line 60, Column 618: end tag for element "div" which is not open

    …he'> > mercredi 22 juin </b></div><div class='recherche'> > Agglomérat…



    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 occurred in a script section of your document, you should probably read this FAQ entry.
    Error Line 60, Column 641: document type does not allow element "div" here

    …uin </b></div><div class='recherche'> > Agglomération_Caen </div><div c…



    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 60, Column 697: document type does not allow element "div" here

    …on_Caen </div><div class='recherche'>Début à : 19h30 </div><div class='rec…



    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 60, Column 744: document type does not allow element "div" here

    …: 19h30 </div><div class='recherche'> Tarif : Gratuit </div><div class='r…



    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 60, Column 793: document type does not allow element "div" here

    …Gratuit </div><div class='recherche'> où ? Le QG </div><b><div class='rech…



    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 60, Column 816: document type does not allow element "b" here

    …ass='recherche'> où ? Le QG </div><b><div class='recherche'> qui ? Dub In Vo…



    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 60, Column 839: document type does not allow element "div" here; missing one of "object", "ins", "del", "map", "button" start-tag

    …e QG </div><b><div class='recherche'> qui ? Dub In Vo </b></div><p></p><di…



    The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

    One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
    Error Line 60, Column 862: end tag for "div" omitted, but OMITTAG NO was specified

    …ass='recherche'> qui ? Dub In Vo </b></div><p></p><div class='recherche'> …



    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
    Info Line 60, Column 817: start tag was here

    …ss='recherche'> où ? Le QG </div><b><div class='recherche'> qui ? Dub In Vo …

    Error Line 60, Column 868: end tag for element "div" which is not open

    …echerche'> qui ? Dub In Vo </b></div><p></p><div class='recherche'> < d…



    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 occurred in a script section of your document, you should probably read this FAQ entry.
    Error Line 60, Column 871: document type does not allow element "p" here

    …erche'> qui ? Dub In Vo </b></div><p></p><div class='recherche'> < dub …



    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 60, Column 898: document type does not allow element "div" here

    …/b></div><p></p><div class='recherche'> < dub in vo en concert </div><b…



    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).
    Warning Line 60, Column 905: character "<" is the first character of a delimiter but occurred as data

    …iv><p></p><div class='recherche'> < dub in vo en concert </div><br></br>



    This message may appear in several cases:
    You tried to include the "<" character in your page: you should escape it as "&lt;"
    You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
    Another possibility is that you forgot to close quotes in a previous tag.
    Error Line 60, Column 939: document type does not allow element "br" here

    …iv><p></p><div class='recherche'> < dub in vo en concert </div><br></br>



    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 86, Column 22: document type does not allow element "div" here

    <div id="mainContent">



    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 94, Column 17: document type does not allow element "div" here

    <div id="footer">



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

  5. #5
    Expert éminent
    Avatar de 12monkeys
    Homme Profil pro
    Webmaster
    Inscrit en
    Novembre 2006
    Messages
    4 093
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : France, Puy de Dôme (Auvergne)

    Informations professionnelles :
    Activité : Webmaster
    Secteur : Service public

    Informations forums :
    Inscription : Novembre 2006
    Messages : 4 093
    Points : 9 031
    Points
    9 031
    Par défaut
    Ce que tu nous mets ne me permets pas de te répondre, il faut le code entier ou une page en ligne.

    Sinon tu peux lire ce tutoriel sur XHTML qui te permettra de savoir ce qui est autorisé et pas : http://a-pellegrini.developpez.com/tutoriels/xhtml/
    Vous souhaitez participer à la rubrique (X)HTML/CSS, contactez moi.
    débutez avec les CSS
    Pas de MP pour des questions techniques ! Mode d'emploi du forum ; Règles ; Pensez à la balise code ; Pas de SMS !
    Votez pour les messages qui vous ont aidés...

  6. #6
    Membre habitué Avatar de fazpedro
    Homme Profil pro
    Inscrit en
    Août 2009
    Messages
    504
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Août 2009
    Messages : 504
    Points : 128
    Points
    128
    Par défaut
    j'ai modifié mais j'ai toujours des messages d'erreur :

    Code source de la page générée :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
        <head>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
        <title>MON SITE</title>
        <link rel="stylesheet" type="text/css" href="style.css" />
        </head>
        <body>
        <div id="haut">
        <div id="en_tete">
        <img src="image.jpeg" alt="image du site"title="Perdu?" />
        <h2> Le site des sorties </h2>
        </div>
        <ul id="tabnav">
        <li><a href="index.php">Accueil</a></li>
        <li><a href="agenda.php">Recherche_Agenda</a></li>
        <li><a href="annoncer.php">Annoncer un &eacute;v&egrave;nenement</a></li>
        <li><a href="morceaux.php">Morceaux de la semaine</a></li>
        <li><a href="liens.php">Liens</a></li>
        <li><a href="contact.php">Nous contacter</a></li>
        <li><a href="newsletter.php">Newsletter</a></li>
        </ul>
        </div>
        <!-- insère le bandeau principal en haut -->
        <div id="mainContent">
        <h3><strong>A la une</strong></h3><p></p><b>Retrouvez tous les nouveaux évènements de ce jour</b><br></br>Ajourd'hui&nbsp;<b>Mercredi 22 Juin&nbsp;&nbsp;</b><br></br><p></p><b><div class='recherche'>Concert </b></div><p></p><div class='recherche'> > Salle_Concert </div><b><div class='recherche'> > mercredi 22 juin </b></div><div class='recherche'> > Agglomération_Caen </div><div class='recherche'>Début à : 19h30 </div><div class='recherche'> Tarif : Gratuit </div><div class='recherche'> où ? Le QG </div><b><div class='recherche'> qui ? Dub In Vo </b></div><p></p><div class='recherche'> < dub in vo en concert </div><br></br><a href="#haut">Haut de page</a><br></br><h3><strong>Cette semaine</strong></h3><p></p><b>Retrouvez tous les nouveaux évènements des 7 prochains jours</b><br></br>Du <b>Jeudi 23 Juin&nbsp;&nbsp;</b>Au <b>Jeudi 30 Juin&nbsp;&nbsp;</b><p><b>Aucun &eacute;v&egrave;nement ! </b></p><br></br><a href="#haut">Haut de page</a>
        <!-- insère le côté gauche -->
        </div>
        <br />
        <br />
        <a href="#haut">Haut de page</a>
        <br />
        <br />
        <div id="footer">
        <p>mon site</p>
        </div>
        <!-- insère le bas de page -->
        </body>
        </html>
    Erreur :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    Line 32, Column 199: document type does not allow element "div" here; missing one of "object", "ins", "del", "map", "button" start-tag
     
    …></br><p></p><b><div class='recherche'>Concert   </b></div><p></p><div class='…
     
    The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
     
    One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

  7. #7
    Modérateur
    Avatar de Bisûnûrs
    Profil pro
    Développeur Web
    Inscrit en
    Janvier 2004
    Messages
    9 868
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Janvier 2004
    Messages : 9 868
    Points : 16 258
    Points
    16 258
    Par défaut
    Tu n'as pas le droit de mettre de div dans un b.

  8. #8
    Expert éminent
    Avatar de 12monkeys
    Homme Profil pro
    Webmaster
    Inscrit en
    Novembre 2006
    Messages
    4 093
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : France, Puy de Dôme (Auvergne)

    Informations professionnelles :
    Activité : Webmaster
    Secteur : Service public

    Informations forums :
    Inscription : Novembre 2006
    Messages : 4 093
    Points : 9 031
    Points
    9 031
    Par défaut
    Si tu avais suivi mon lien tu aurais pu le déduire, c'est expliqué ici : http://a-pellegrini.developpez.com/t.../xhtml/#L5.1.1

    Au passage pourquoi des paragraphes vides : <p></p> ??

    De même <br></br> n'est pas juste... http://a-pellegrini.developpez.com/t.../xhtml/#L5.2.2 c'est une balise auto fermante qui doit être écrite ainsi <br />
    Vous souhaitez participer à la rubrique (X)HTML/CSS, contactez moi.
    débutez avec les CSS
    Pas de MP pour des questions techniques ! Mode d'emploi du forum ; Règles ; Pensez à la balise code ; Pas de SMS !
    Votez pour les messages qui vous ont aidés...

  9. #9
    Membre habitué Avatar de fazpedro
    Homme Profil pro
    Inscrit en
    Août 2009
    Messages
    504
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Août 2009
    Messages : 504
    Points : 128
    Points
    128
    Par défaut
    Merci 12monkeys et Bisûnûrs !

    eh oui je n'avais pas cherché beaucoup...
    j'ai modifié le code et simplifié au passage et là OK pour la validation W3C !
    This document was successfully checked as XHTML 1.0 Strict!


    bandeau.php :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    <div id="haut">
    		<div id="en_tete">
    			<img src="image.jpeg" alt="image du site" title="Perdu?" />
    			<h2> Le site des sorties </h2>
    		</div>
    		<ul id="tabnav">
    			<li><a href="index.php">Accueil</a></li>
    			<li><a href="agenda.php">Recherche_Agenda</a></li>
    			<li><a href="annoncer.php">Annoncer un &eacute;v&egrave;nenement</a></li>
    			<li><a href="morceaux.php">Morceaux de la semaine</a></li>			
    			<li><a href="liens.php">Liens</a></li>
    			<li><a href="contact.php">Nous contacter</a></li>
    			<li><a href="newsletter.php">Newsletter</a></li>
    		</ul>
     
    </div>
    recherche_pour_news.php :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    <?php
    // *************************************************************************************************
    //                                                      pour Affichage des évènements du jour
    // *************************************************************************************************
    echo '<h3>'.'<strong>'.'A la une'.'</strong>'.'</h3>';
    echo '<br />';
    echo '<b>'.'Retrouvez tous les nouveaux évènements de ce jour'.'</b>';
    echo '<br />';
    // On ne vérifie pas l'année !
    $annee="2011";
    // création de la date de départ au format date MySQL  année  mois jour
    $date_depart=$annee.'-'.date('n').'-'.date('j');
    // création de la date de fin au format date MySQL
    $date_fin=$annee.'-'.date('n').'-'.date('j');
    //On remet les dates au format français
    setlocale (LC_TIME, 'fr_FR.UTF8');
    $date_vue_depart = strftime("%A %d %B",strtotime("$date_depart"));
    $date_vue_fin = strftime("%A %d %B",strtotime("$date_fin"));
    // Affichage de la date de départ et de fin en français
    echo 'Ajourd\'hui'.'&nbsp;'.'<b>'.ucwords(strtolower($date_vue_depart)).'&nbsp;'.'&nbsp;'.'</b>';
    echo '<br />';
    // connexion à la base
    require("configuration.php");
    $sql = connect_sql();
    // on écrit la requête
    $select2 = "SELECT type_evenement, type_etab, secteur, heure, tarif, lieu, nom, description, date_ev 
    FROM evenement WHERE date_ev BETWEEN '$date_depart' AND '$date_fin' ORDER BY date_ev ASC";
    $result = mysql_query($select2) or die ('Erreur : '.mysql_error() );
    $total = mysql_num_rows($result);
    //On vérifie que la table contient quelque chose
    if
    (mysql_num_rows($result) == 0)
    {
    echo '<p>'.'<b>'.'Aucun &eacute;v&egrave;nement ! '.'</b>'.'</p>'.'<br>'.'</br>';
    echo '<a href="#haut">'.'Haut de page'.'</a>';
    }
    //Si il y a des entrées          
    else
    {
    //On fait une boucle pour sortir toutes les entrées
    while($affiche = mysql_fetch_array($result))
    {
    //On remet la date au format français
    setlocale (LC_TIME, 'fr_FR.UTF8');
    $date_affiche = $affiche["date_ev"];
    $date_vue = strftime("%A %d %B",strtotime("$date_affiche"));
    //On affiche les entrées du jour
    echo '<br />';
    echo '<b>'.$affiche["type_evenement"]."   ".'</b>';
    echo '<br />';
    echo "    > ".$affiche["type_etab"]."   ";
    echo '<b>'."    > ".$date_vue."   ".'</b>';
    echo "    > ".$affiche["secteur"]."   ";
    echo "Début à : ".$affiche["heure"]."   ";
    echo "  Tarif : ".$affiche["tarif"]."   ";
    echo " où ? ".$affiche["lieu"]."   ";
    echo '<b>'." qui ? ".$affiche["nom"]."   ".'</b>';
    echo '<br />';
    echo "      = ".$affiche["description"]."   ";
    echo '<br />';
    //On ferme la boucle while
     }
    //on ferme le else
    echo '<a href="#haut">'.'Haut de page'.'</a>';
    }
    // *************************************************************************************************
    //                                                      pour affichage des données de la semaine en cours
    // *************************************************************************************************
    echo '<br />';
    echo '<h3>'.'<strong>'.'Cette semaine'.'</strong>'.'</h3>';
    echo '<br />';
    echo '<b>'.'Retrouvez tous les nouveaux évènements des 7 prochains jours'.'</b>';
    echo '<br />';
    // On ne vérifie pas l'année !
    $annee2="2011";
    // création de la date de départ au format date MySQL  année  mois jour
    $date_depart3=$annee2.'-'.date('n').'-'.date('j');
    $date_depart2 = date('Y-m-d', strtotime($date_depart3.' +1 days'));
    // création de la date de fin au format date MySQL
    $date_fin2 = date('Y-m-d', strtotime($date_depart2.' +7 days'));
    //On remet les dates au format français
    setlocale (LC_TIME, 'fr_FR.UTF8');
    $date_vue_depart2 = strftime("%A %d %B",strtotime("$date_depart2"));
    $date_vue_fin2 = strftime("%A %d %B",strtotime("$date_fin2"));
    // Affichage de la date de départ 2 et de fin 2 en français
    echo 'Du '.'<b>'.ucwords(strtolower($date_vue_depart2)).'&nbsp;'.'&nbsp;'.'</b>';
    echo 'Au '.'<b>'.ucwords(strtolower($date_vue_fin2)).'&nbsp;'.'&nbsp;'.'</b>';
    // on écrit la deuxième requête
    $select3 = "SELECT type_evenement, type_etab, secteur, heure, tarif, lieu, nom, description, date_ev 
    FROM evenement WHERE date_ev BETWEEN '$date_depart2' AND '$date_fin2' ORDER BY date_ev ASC";
    $result2 = mysql_query($select3) or die ('Erreur : '.mysql_error() );
    $total = mysql_num_rows($result2);
    //On vérifie que la table contient quelque chose
    if
    (mysql_num_rows($result2) == 0)
    {
    echo '<p>'.'<b>'.'Aucun &eacute;v&egrave;nement ! '.'</b>'.'</p>'.'<br>'.'</br>';
    echo '<a href="#haut">'.'Haut de page'.'</a>';
    }
    //Si il y a des entrées          
    else
    {
    //On fait une boucle pour sortir toutes les entrées de la semaine
    while($affiche2 = mysql_fetch_array($result2))
     {
    //On remet la date au format français
    setlocale (LC_TIME, 'fr_FR.UTF8');
    $date_affiche2 = $affiche2["date_ev"];
    $date_vue2 = strftime("%A %d %B",strtotime("$date_affiche2"));
     //On affiche les entrées de la semaine
    echo '<br />';
    echo '<b>'.$affiche2["type_evenement"]."   ".'</b>';
    echo '<br />';
    echo "    > ".$affiche2["type_etab"]."   ";
    echo '<b>'."    > ".$date_vue2."   ".'</b>';
    echo "    > ".$affiche2["secteur"]."   ";
    echo "Début à : ".$affiche2["heure"]."   ";
    echo "  Tarif : ".$affiche2["tarif"]."   ";
    echo " où ? ".$affiche2["lieu"]."   ";
    echo '<b>'." qui ? ".$affiche2["nom"]."   ".'</b>';
    echo '<br />';
    echo "      = ".$affiche2["description"]."   ";
    echo '<br />';
    //On ferme la boucle while
     }
    //on ferme le else
    }
    // Fermeture de la connexion à la base de données
    mysql_close();          
    ?>
    index.php :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
    <head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />	
    <title>MON SITE</title>
    <link rel="stylesheet" type="text/css" href="style.css" />
    </head>
    <body>
    <?php include('bandeau.php'); ?> <!-- insère le bandeau principal en haut -->
    <div id="mainContent">
    <?php require("recherche_pour_news.php"); ?> <!-- insère la recherche des news de la semaine -->
    </div>
    <?php include('bas_de_page.php'); ?> <!-- insère le bas de page  -->
    </body>
    </html>
    bas_de_page.php :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    <p><br /></p>
    <p><br /></p>
    <p><a href="#haut">Haut de page</a></p>
    <p><br /></p>
    <p><br /></p>
     
    <div id="footer">
    <p>Copyleft mon site</p>
    </div>

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [XHTML] Validation W3C
    Par Mister Nono dans le forum Balisage (X)HTML et validation W3C
    Réponses: 5
    Dernier message: 05/12/2005, 14h34
  2. [HTML] URLs avec variable et validation W3C
    Par pirouette_07 dans le forum Balisage (X)HTML et validation W3C
    Réponses: 8
    Dernier message: 11/10/2005, 11h27
  3. validation w3c et javascript: erreur?
    Par stoyak dans le forum Général JavaScript
    Réponses: 2
    Dernier message: 28/08/2005, 14h59
  4. [HTML / Viewpoint / Valid W3C] Problème de lecture
    Par zebden dans le forum Balisage (X)HTML et validation W3C
    Réponses: 2
    Dernier message: 01/02/2005, 11h15

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo