HTML CSS examples for HTML Tag:meta
You can use Metadata to Describe the Document.
The meta element allows you to define different kinds of metadata in your document.
The meta Element summary
Item | Value |
---|---|
Element | meta |
Element Type | Metadata |
Permitted Parents | head |
Local Attributes | name, content, charset, http-equiv |
Contents | None |
Tag Style | Void |
New in HTML5 | No |
Changes in HTML5 | The charset attribute is new in HTML5. The scheme attribute is now obsolete. |
Style Convention | None |
Set Name/Value Metadata Pairs
You can use the meta element is to define metadata in name/value pairs, for which you use the name and content attributes.
Using the meta Element to Define Metadata in Name/Value Pairs
<!DOCTYPE html> <html> <head> <title>Example</title> <base href="http://java2s.com/"> <meta name="author" content="java2s.com"> <meta name="description" content="A simple example"> </head> <body> <p> I like <code id="myId">HTML</code> and CSS. <!--from w ww . ja va2 s . c om--> </p> <a href="http://java2s.com">Visit java2s.com</a> <a href="page2.html">Page 2</a> </body> </html>