Meta-data is represented by the <meta> tag. Meta-data means data about data. In the simplest terms, this tag provides information about the HTML document.
The contents of the <meta> tag are not displayed on the webpage. Meta-data is used by browsers and search engines. Search engines and browsers get information about the web page through <meta> tags.
For example, search engines get information about the author of the web page by <meta> tag and web browser get information such as viewport by <meta> tag, which helps to present the webpage correctly.
The information given below can be provided by <meta> tags.
Description
You can provide a description of the web page by using <meta> tag. This description is shown in the search results by search engines. When your web page is shown in the search results, the same description is shown below the page title. If you do not define the description by the <meta> tag then search engines use some of the starting lines of the article as a description.
Keywords
You can provide information about keywords related to your webpage to search engines by using <meta> tag. Keywords are important for ranking in search results. From keywords, search engines know with which topic related information is provided on a particular page.
Author
The information from the author of the web page is also provided by <meta> tag.
Last Modified
This information can also be provided by <meta> tag when the last page was modified to the web page.
Character Set
You can also provide the character encoding information used in the document by <meta> tag.
<meta> tag is also very important in terms of Search Engine Optimization (SEO). Also, you can control the presentation of your web page on the screen of different sizes by using <meta> tag.
One important thing about the <meta> tag is that it is always defined in the head tag itself.
How to use HTML Meta Tags?
Syntax of HTML <meta> Tag
Generic syntax of the given HTML <meta> tag is being given.
<meta attribute = "value">
There is no end tag of the <meta> tag in the HTML. But if you are coding in XHTML, then you have to close it with the ending tag.
Attributes of HTML <meta> Tag
The following information about being available with the <meta> tag is being explained.
charset - This attribute is used to define the character encoding of the document.
content - This attribute is used to define the value of the name and http-equiv attributes.
http-equiv - You provide headers for information defined by the content attribute from this attribute. This attribute can be content-type, default-style, and refresh possible values.
name - The name of meta-data is defined by this attribute. This attribute can be application-name, author, description, viewport, keywords, and generator possible values.
The scheme attribute of <meta> tag has been removed in HTML5. <meta> tag also supports all global attributes.
An example of describing the author and description of the web page by <meta> tag has been given below.
0 Comments:
Post a Comment
Thank you for reading this post. Please do not enter any spam link in the comment box.