HTTP-equiv Directives
HTML meta http-equiv="content-type"
Legacy HTML encoding declaration. Use the shorter meta charset=utf-8 form for new documents and ensure the HTTP encoding agrees; the encoding declaration must appear early in the document.
Formal Syntax & Structure
html syntaxhtml
<meta http-equiv="content-type" content="text/html; charset=utf-8">Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| http-equiv | pragma keyword | Use content-type. |
| content | directive-specific value | Example: text/html; charset=utf-8. |
Working Example
Example Snippethtml
<!doctype html><html lang="en"> <head> <title>Example</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"> </head> <body> <p>Example document</p> </body></html>