HTML

why use meta tag in html

Meaning and examples

An HTML document’s metadata is defined via the <meta> tag. Data about data is referred to as metadata.

The character set, page description, keywords, document author, and viewport settings are all commonly specified using “meta” elements, which are always placed inside the “head” element.

Although it won’t be visible on the website, metadata may still be parsed by computers.

Search engines (keywords), browsers (how to show information or reload the page), and other online services all employ metadata.

Through the usage of the meta> tag, web designers have the ability to adjust the viewport (the portion of a web page that users can see) (See “Setting The Viewport” example below).

Attribute Value Description
charset character_set Specifies the HTML document’s character encoding
content text Specifies the value connected to the name or HTTP-equiv attribute.
HTTP-equiv content-security-policy
content-type
default-style
refresh
Gives an HTTP header with the value and details of the content attribute
name application-name
author
description
generator
keywords
viewport
Specifies the metadata’s name.

Why are meta tags used? What are they?

The phrase “why use meta tag in HTML”
Meta tags are text fragments that describe a page’s content; they only appear in the source code of a page, not on the actual page. Meta tags are simply tiny content descriptors that assist in describing to search engines the subject matter of a web page.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *