Aller au contenu

Attribut content HTML

L'attribut content spécifie une valeur associée à l'attribut name ou http-equiv.

Vous ne pouvez utiliser cet attribut que sur l'élément meta pour définir des informations méta dans un document HTML.

Syntaxe

html
<meta name="description" content="A description of the document">

Exemple de l'attribut content HTML

html
<!DOCTYPE html>
<html>
  <head>
    <meta name="description" content="Online Free Tutorials" />
    <meta name="keywords" content="HTML,CSS,JavaScript,PHP, Git" />
    <meta http-equiv="refresh" content="30" />
  </head>
  <body>
    <h1>Example of the HTML "content" attribute</h1>
    <p>Lorem ipsum, or lorem ipsum as it is sometimes known, is dummy text used in laying out print, graphic or web designs. The passage is attributed to an unknown typesetter in the 15th century who is thought to have scrambled parts of Cicero's De Finibus Bonorum et Malorum for use in a type specimen book.</p>
  </body>
</html>

Practice

Quelles sont les utilisations valides de l'attribut content HTML selon la ressource web fournie ?

Trouvez-vous cela utile?

Aperçu dual-run — comparez avec les routes Symfony en production.