Table of contents
Introduction:
A meta tag is a snippet of code present in the head section of a web page. It provides information about the page to search engines, influencing how the page is displayed and ranked when searched.
In simple words, it is data about data.
Importance of Meta Tags:
Search Engine Optimization (SEO): They provide the browsers with relevant information about the content of the page. This helps search engines understand the page's topic, and keywords resulting in page ranking.
User Experience: Provide a concise and informative description of the page's content. This leads to an increase in the traffic on the web page.
Controlling Browser Behavior: Certain meta tags can control how browsers display the page, such as specifying the page's character encoding and viewport settings.
Common meta tags:
<meta name="viewport" content="width=device-width, initial-scale=1.0"\>:This instructs the browser to set the viewport width to the device's width , and set the initial zoom level of the page to 1.0, which means the page will be displayed without zooming.
<meta name="description" content=" whatever you want to write"/\>
<meta name="keyword" content="write the keywords here"/>: Keyoword will tell what information the page is holding or the words associated with the website.
<meta http-equiv="refresh" content="Time after which another page will be rendered ; after the time is over the website url given here will be rendered">
Code for it:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="jo aap likhna chaho"/>
<meta name="keyword" content="html ,sql"/>
<meta name="author" content="himanshu"/>
<meta http-equiv="refresh" content="5 ; url=https://www.google.com/">
<title>meta</title>
</head>
<body>
</body>
</html>