HTML CSS Bootstrap Javascript Icons Python
HTML References
HTML - Tag Reference HTML - Tag by Category HTML - Attributes HTML - Global Attributes HTML - Events HTML - Language Codes HTML - Country Codes HTML - URL Encoding HTTP Methods HTTP Status Codes <input> types
All HTML Tags
<!-- --> <!DOCTYPE> <a> <abbr> <acronym> <address> <applet> <area> <article> <aside> <audio> <b> <base> <basefont> <bdi> <bdo> <big> <blockquote> <body> <br> <button> <canvas> <caption> <center> <cite> <code> <col> <colgroup> <data> <datalist> <dd> <del> <details> <dfn> <dialog> <dir> <div> <dl> <dt> <em> <embed> <fieldset> <figcaption> <figure> <font> <footer> <form> <frame> <frameset> <h1> - <h6> <head> <header> <hr> <html> <i> <iframe> <img> <input> <ins> <kbd> <label> <legend> <li> <link> <main> <map> <mark> <meta> <meter> <nav> <noframes> <noscript> <object> <ol> <optgroup> <option> <output> <p> <param> <picture> <pre> <progress> <q> <rp> <rt> <ruby> <s> <samp> <script> <section> <select> <small> <source> <span> <strike> <strong> <style> <sub> <summary> <sup> <svg> <table> <tbody> <td> <template> <textarea> <tfoot> <th> <thead> <time> <title> <tr> <track> <tt> <u> <ul> <var> <video> <wbr>

HTML <meta> tag

The HTML <meta> element is used for declaring metadata (additional important information) for the HTML document.

The meta elements can be used to include name/value pairs describing properties of the HTML document, such as author, expiry date, a list of keywords, description etc.

This tag is an empty element and so does not have a closing tag but it carries information within its attributes.

You can include one or more meta tags in your document based on what information you want to keep in your document but in general, meta tags do not impact physical appearance of the document.

Run code

The <meta> element always go inside the <head> element.

The meta element contains information about the current document, such as its keywords, description, author etc., that may be useful to search engines, and other data that is not considered document content.

Browser compatibility

The <meta> element is fully supported by all browsers:

<meta> yes yes yes yes yes


The following table shows the attributes that are specific to the <meta> tag:

Attribute Value Description
charset character-set Specifies the character encoding for the HTML document
content text Gives the value associated with the http-equiv or name attribute
http-equiv content-type
Provides an HTTP header for the information/value of the content attribute
name application-name
Specifies a name for the metadata.
This metadata name is associated with the value contained by the content attribute
scheme format/URI Not supported in HTML5.
Specifies a scheme to be used to interpret the value of the content attribute

Global Attributes

The <meta> tag supports the global attributes described in HTML Global Attributes Reference

More Examples

Example 1 - Define charset of the document:

Example 2 - Define keywords for search engines:

Example 3 - Define a description of your web page:

Example 4 - Define the author of a page:

Example 5 - Refresh document every 30 seconds:

Example 6 - Setting the viewport to make your website look good on all devices:

Example 7 - Requests the robot (crawler) to not index the page:

Last updated: Wednesday 26 Sep, 2018