- HTML Basics
- HTML Home
- HTML Basics
- HTML Document Structure
- HTML Data Types
- HTML Attributes
- HTML Fonts
- HTML Headings
- HTML Character Entities
- HTML Horizontal Line
- HTML Line Break
- HTML Paragraph
- HTML Citation Definition
- HTML Quotations
- HTML Comments
- HTML Styles
- HTML Formatting
- HTML CSS
- HTML Tags
- HTML Basic Tags
- HTML All Tags
- HTML Root Tags
- HTML Metadata Tags
- HTML Section Tags
- HTML Head Heading Tags
- HTML Flow Tags
- HTML Phrasing Tags
- HTML Embedded Tags
- HTML Interactive Tags
- HTML Meta Tags
- HTML Texts
- HTML Text Formatting
- HTML Physical Style Text
- HTML Logical Style Text
- HTML Organizing Text
- HTML Arranging Text
- HTML Displaying Lists
- HTML List
- HTML Links Tables
- HTML Links URLs
- HTML Links
- HTML URL Encode
- HTML Tables
- HTML Images Colors
- HTML Images Colors
- HTML Images
- HTML Color Codes
- HTML Canvas
- HTML Backgrounds
- HTML Forms
- HTML Forms
- HTML Form Tag
- HTML Input Tag
- HTML Button Tag
- HTML Multiple-Choice
- HTML Select Tag
- HTML Option Tag
- HTML Optgroup Tag
- HTML Textarea Label
- HTML Fieldset Legend
- HTML Datalist Tag
- HTML Keygen Tag
- HTML Output Tag
- HTML Progress Tag
- HTML Meter Tag
- HTML Submit Form
- HTML enctype Attribute
- HTML action Attribute
- HTML Method Attribute
- HTML Get Method
- HTML Post Method
- HTML Interactive
- HTML Interactive Web
- HTML Details Summary
- HTML Menu Tag
- HTML Command Tag
- HTML KBD Tag
- HTML Time Tag
- HTML Multimedia
- HTML Multimedia
- HTML Multimedia Tags
- HTML Audio Video
- HTML Embedded Multimedia
- HTML EMBED Tag
- HTML OBJECT Tag
- HTML FIGURE FIGCAPTION
- HTML Advance
- HTML Blocks
- HTML Classes
- HTML Iframes
- HTML JavaScript
- HTML Layouts
- HTML Responsive
- HTML Test
- HTML Online Test
- Give Online Test
- All Test List
HTML Meta Tags
HTML meta tags is generally used to specify metadata (additional information about the document).
The HTML <META> tag appears inside the HEAD tag and has the following five attributes:
- charset
- content
- http-equiv
- name
- scheme
HTML META Tag Attributes
The table given below list and describes all attributes of the HTML META tag:
Attribute | Value | Description |
---|---|---|
charset | character encoding | Defines character encoding for the document |
contents | some_text | Defines the content of the meta data |
http-equiv | content-type expires, refresh, set-cookie |
Provides information of the contents attribute to an http header |
name | author, description, keywords, generator, revised, others |
Provide the content of the contents attributes |
HTML META Tag Example
The following HTML code fragment shows the use of the META tag in a document :
<head> <META name="keywords" contents="keyword list"/> </head>
Here is an example uses HTML META tags:
<!DOCTYPE html> <html> <head> <title>HTML Meta Tags Example</title> <meta name="keywords" content="html, meta, tags, example"> <meta name="description" content="HTML meta tags tutorial with examples"> <meta name="author" content="codescracker"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta http-equiv="refresh" content="30"> <meta http-equiv="expires" content="Wed, 20 June 2018 14:25:27 GMT"> <meta name="robots" content="noindex, nofollow"> </head> <body> <p>Hello, HTML Meta Tags Example!</p> </body> </html>
Here is the sample output produced by the above HTML Meta Tags example code:

From the above HTML meta tag example, the
- name="keywords" - is used to define or give keywords to the web page
- name="description" - is used to provide description of the web page
- name="author" - is used to provide author information of the web page
- http-equiv="content-type" - is used to provide the content type of the web page
- http-equiv="refresh" - is used to provide web page refreshing delay
- http-equiv="expires" - is used to provide expiry of the web page
- name="robots" - is used to tell robots, not to index the content of the web page
HTML Meta Tag to Give Keywords to Web Page
You can use HTML meta tag to specify keywords for your HTML document. Here is an example using meta tag in specifying keywords for the web page:
<!DOCTYPE html> <html> <head> <title>HTML Meta Tag (keywords) Example</title> <meta name="keywords" content="html,meta,tag,example,tutorial" /> </head> <body> <p>Hello, HTML Meta Tag (keywords) Example!</p> </body> </html>
Following is the sample output of the above HTML meta tabs to give keywords for a web page example code:

HTML meta Tag to Give Description to Web Page
You can use HTML meta tag in specifying the description of the HTML document. Here is an example of document description using meta tag in HTML:
<!DOCTYPE html> <html> <head> <title>HTML Meta Tag (description) Example</title> <meta name="description" content="html meta tag tutorial with example" /> </head> <body> <p>Hello, HTML Meta Tag (description) Example!</p> </body> </html>
Here is the sample output produced by the above HTML meta tag to give description to web page example code:

HTML meta Tag to to Give Last Update Time to Web Page
You can use HTML meta tag to specify information about when the HTML document was updated last time. Here is an example show how to specify the last update time of the document in HTML:
<!DOCTYPE html> <html> <head> <title>HTML Meta Tag (revised) Example</title> <meta name="revised" content="codescracker, 7/1/2016" /> </head> <body> <p>Hello, HTML Meta Tag (revised) Example!</p> </body> </html>
Below is the sample output of the above HTML meta tag to give last update time to web page example code:

HTML meta Tag to Refresh Web Page Automatically after Given Time
You can use HTML meta tag to refresh your web page automatically after given interval of time. Here is an example showing how to refresh web page automatically in every 10 seconds:
<!DOCTYPE html> <html> <head> <title>HTML Meta Tag (refresh) Example</title> <meta http-equiv="refresh" content="10" /> </head> <body> <p>Hello, HTML Meta Tag (refresh) Example!</p> </body> </html>
Here is the sample output of the above HTML meta tag to refresh web page automatically after a given interval of time example code:

HTML meta Tag to Redirect Web Page
You can use HTML meta tag to redirect your web page to any other webpage. Here is an example showing how to redirect web page:
<!DOCTYPE html> <html> <head> <title>HTML Meta Tag (refresh - redirect) Example</title> <meta http-equiv="refresh" content="10; url=http://codescracker.com" /> </head> <body> <p>Hello, HTML Meta Tag (refresh - redirect) Example!</p> </body> </html>
Here is the sample output of the above HTML meta tag to redirect web page example code. This is the initial output:

Wait for 10 seconds, after 10 seconds it will be redirected to the specified url. Here it will be redirected to codescracker.com and the Result you will get after 10 second in the browser will be:

HTML meta Tag to Set Cookies
You can use HTML meta tag to specify cookie. Cookies are simply the data that stored inside the small text files on your computer. It is exchanged b/w your web browser and web server to keep track of various information. Here is an example uses meta tag to set cookie in HTML:
<!DOCTYPE html> <html> <head> <title>HTML Meta Tag (cookie) Example</title> <meta http-equiv="cookie" content="userid=xyz; expires=Wednesday, 19-Sept-18 23:59:59 GMT;" /> </head> <body> <p>Hello, HTML Meta Tag (cookie) Example!</p> </body> </html>
Following is the sample output of the above HTML meta tag to set cookies example code:

HTML meta Tag to Set Author Name
You can use HTML meta tag to set author's name for your web page. Here is an example using meta tag to specify author's name:
<!DOCTYPE html> <html> <head> <title>HTML Meta Tag (author) Example</title> <meta name="author" content="codescracker" /> </head> <body> <p>Hello, HTML Meta Tag (author) Example!</p> </body> </html>
Here is the sample output produced by the above HTML meta tag to set author name example code:

HTML meta Tag to Give Character Set to Web Page
You are free to use meta tag to specify the characters set for the document. Here is an example using meta tag in specifying the character set for the document in HTML:
<!DOCTYPE html> <html> <head> <title>HTML Meta Tag (Content-Type) Example</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> </head> <body> <p>Hello, HTML Meta Tag (Content-Type) Example!</p> </body> </html>
Here is the sample output of the above HTML meta tag to give character set to a web page example code:

« Previous Tutorial Next Tutorial »