Meta tags in HTML
- 24-07-2022
- Trung Minh
- 0 Comments
Browser support :
- Chrome
- Firefox
- IE
- Safari
- Opera
Browser support :
- Chrome
- Firefox
- IE
- Safari
- Opera
Browser support :
- Chrome
- Firefox
- IE
- Safari
- Opera
Browser support :
- Chrome
- Firefox
- IE
- Safari
- Opera
In this article, we will learn the meta tag in HTML, this is a tag used to declare parameters, description, and configuration for the HTML document file. Although it does not show up on the interface, it is very important in SEO.
1. What are meta tags in HTML?
The meta tag will describe information about the page, keywords, description of the author, last edited.. for the HTML document. Thereby, search engines will know this information and will help users find content on the internet easily.
The information that the meta tag describes will not be displayed on the page, but will be analyzed and saved by the computer in memory.
The syntax is as follows:
<meta name="name" content="content">
Where name
is the name of the meta ( category ), content
is the content of the meta. If you are learning the basics of HTML and CSS, you may not need to care about this tag. But later when publishing the website on the internet, special attention must be paid to it.
2. How to use meta tags in HTML
Example : Use meta tag to define information about HTML page.
<head> <meta charset="UTF-8"> <meta name="description" content="Free Web tutorials"> <meta name="keywords" content="HTML,CSS,XML,JavaScript"> <meta name="author" content="John Doe"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head>
In which :
- The meta description tag will describe the main content of the page.
- The meta keywords tag will describe the main keywords of the page.
- The author meta tag will declare the author for the article.
- The viewport meta tag will declare how the web page should be displayed in the browser.
Browser support :
- Chrome
- Firefox
- IE
- Safari
- Opera