[XHTML] xhtml strict et balise <img>
Bonjour,
Est-ce que quelqu'un aurait la raison pour laquelle on ne doit pas mettre de balise img telle quelle en xhtml strict.
On doit l'inclure dans un <div> ou <h1> ou <p>, etc.
Pourquoi ?
Exemple :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| <?xml version="1.0" encoding="ISO-8859-1"?>
<!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">
<head>
<title>Titre</title>
</head>
<body style="top-margin:0px; left-margin:0px">
<img src="image.gif" width="100" height="75" alt="texte alternatif"/>
</body>
</html> |
n'est pas valide alors que :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<!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">
<head>
<title>Titre</title>
</head>
<body style="top-margin:0px; left-margin:0px">
<div><img src="image.gif" width="100" height="75" alt="texte alternatif"/></div>
</body>
</html> |
est valide.