November 21, 2026
What are meta tags in HTML, and why are they used?
Meta tags are used to send information about website or webpages to search engines. You can improve your website's ranking through meta tags. User of your website can not see this information on their browser. If they have HTML code of your file then they would be able to see this information. In meta tags you can define description of your webpage and you can add key words which can define your webpage. Initially lots of search engines used to look for these key words and description on the internet. But now some of them do not use it. But still there are some search engines still use it, so for better ranking on such search engines you can use meta tags.
You should keep in mind that through right keywords you can reach at the top of the search engines ranking. But if you do not use appropriate or right keywords so you can reach at the bottom of the search engines ranking. There are lots of webmasters use wrong keywords or they repeat keywords for better ranking. So whenever you write keywords it should be appropriate, definitely it would be beneficial for your website's ranking.
Meta tags should be written in head part of the webpage.
| Attribute |
Description |
| Name |
This attribute use to define which kind of meta tag you are using |
| Contents |
This attribute use to define the content according to the name attribute's value. |
Examples are described below:
In below mentioned tag's name attribute have value description which tell to search engines this meta tag provides description of the webpage.
<meta name="description" content="First Html File">
In below mentioned tag's name attribute have value keywords which tell to search engines this meta tag provides keywords related webpage and web site.
<meta name="keywords" content="First Html File, simpleHTML etc">
In below mentioned tag's name attribute have value auther which tell about the author of the webpage.
<meta name="author" content="Auther name">
The revised Meta tag keeps the record about the webpage that when last modification for current page had been done.
<meta name="revised" content=" 1/1/2011">
If you want to refresh your webpage regularly after some seconds or redirect your webpage on any other webpage you can do it with below mentioned example. First of all you will have to set http-equiv attribute as 'refresh' and in content attribute you will have to specify time in seconds to refresh and after a semicolon provide URL where you want to redirect.
<META http-equiv="refresh" content="5; url=http://www.mywebsite.com">
FAQ
1. Do meta tags have closing tags in HTML?
Meta tags are void elements in HTML, which means they do not require separate closing tags. You can write them directly inside the head section using their appropriate attributes.
2. What happens if I do not add meta tags to my webpage?
A webpage can still function without many optional meta tags. However, missing important metadata, such as character encoding or viewport settings, may cause character display or mobile layout problems.
3. Can I use keywords in meta tags to improve search rankings?
You can include relevant keywords in your meta description when they naturally describe the page. However, the meta keywords tag is ignored by major search engines such as Google for ranking purposes.