W3docs

Atributo content de HTML

The contenteditable attribute is used to specify whether or not the content of an element is editable. Read about this attribute and see on what elements to use.

El atributo content especifica un valor asociado al atributo name o http-equiv.

Solo puedes usar este atributo en el meta elemento para establecer información meta en un documento HTML.

Sintaxis

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

Ejemplo del atributo content de 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>

Práctica

Práctica

¿Cuáles son los usos válidos del atributo content de HTML según el recurso web proporcionado?