Why we use meta in html | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 9

Why we use meta in html

Why we use meta in html.what it's do

31st Jul 2020, 1:20 PM
2 Answers
+ 4
The <meta> tag in HTML provides information about HTML Document or in simple words, it provides important information about a document. These tags are basically used to add name/value pairs to describe properties of HTML document, such as expiry date, author name, list of keywords, document author, etc. This tag is an empty element because it only has an opening tag and no closing tag but it carries information within its attributes. A web document can include one or more meta tag depending on information, but in general, it doesn’t affect the physical appearance of the document. Example: <!DOCTYPE html> <html> <head>  <title>meta tag examples</title> <meta name = "keywords" content = "Meta Tags, Metadata"/> </head> <body>  <p>Hello World!</p> </body> </html>                     Output: Hello World!
31st Jul 2020, 1:39 PM