Menu

HTML <meta> Tag
📰

HTML <meta> Tag

DEV Community: html·G A·about 7 hours ago
#i1Mj03cC
#devto2#devto#dev#html#attributes
Reading 0:00
15s threshold

Example

<head>

<meta charset="UTF-8">

<meta name="description" content="Free Web tutorials">

<meta name="keywords" content="HTML, CSS, JavaScript">

<meta name="author" content="John Doe">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

</head>

DEFINITION

A tag in HTML provides metadata about a web page .

A tag is an HTML snippet (SNIPPET refers to a small, reusable piece of source code) placed inside a HTML page's section.

It gives browsers and search engines hidden details about the page.

ATTRIBUTES

charset (character-set)

Specifies the character encoding for the HTML document.

content (text)

Specifies the value associated with the http-equiv or name attribute.

http-equiv (content-type)

Provides an HTTP header for the information/value of the content attribute.

name (author, description, keywords)

Specifies a name for the metadata.

GLOBAL ATTRIBUTES

The tag also supports the Global Attributes in HTML .

SETTING THE VIEWPORT

The viewport is the user's visible…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.