Tutorials Tonight's Logo
Follow Us

HTML META TAG


Meta tag is used to specify metadata about the HTML document. Metadata is a machine readable information about the webpage.

Metadata is additional information about the provided data.

Information provided in meta tag is not visible in the webpage.These information are embedded in the document and are used by search engines and browsers.

Meta tag is an empty tag and has no content value it only has attributes.

The <meta> tag contains two attributes: name and content.

<meta name="name of meta tag" content="your content">

Note: In HTML meta data need not be closed but in XHTML it is necessary to close the meta tag like this ( < meta   / > ) .


Use of meta tag

HTML allows meta tags to be used only inside the head tag.

Meta tag is used to specify about character set,author,keyword,page description,last modification date and other metadata.

<head>
<meta charset="UTF-8">
<meta name="author" content="John Smith">
<meta name="description" content="learning about meta tag">
<meta name="keyword" content="meta tag,tutorial,HTML5">
</head>

viewport setting by meta tag

HTML5 provides us a way to set viewport using a meta tag.

Include the following meta tag to let your web page to control dimension and scaling of the web page.

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

More Learning

Want to learn more about programming and web development? We have a few recommendations for you.


Follow Us

Copyright © Tutorials Tonight. All Rights Are Reserved.