<meta> - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:meta

Introduction

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

ItemValue
Element meta
Element TypeMetadata
Permitted Parents head
Local Attributesname, content, charset, http-equiv
ContentsNone
Tag Style Void
New in HTML5No
Changes in HTML5The charset attribute is new in HTML5. The scheme attribute is now obsolete.
Style ConventionNone

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

Demo Code

ResultView the demo in separate window

<!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>

Related Tutorials