HTML Meta

How to insert Meta Element in HTML5?

The <meta> element is one of those that are included in the head section of a document. It is a container for holding semantic information about a document and could include such details as a document’s author, date of modification, a short description, and its keywords. Use the name attribute to assign property names and the content attribute for their corresponding values. Note that the content attribute is not a container for HTML 5 tags.

Additionally, metadata is not displayed on a webpage although search engines will read it and use it to rank your documents on the World Wide Web.

<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>

Example 1 – Define keywords for search engines:

<meta name="keywords" content="HTML, CSS, XML, XHTML, JavaScript">

Example 2 – Define a description of your web page:

<meta name="description" content="Free Web tutorials on HTML and CSS">

Example 3 – Define the author of a page:

<meta?name="author"?content="John Doe">

Example 4 – Refresh document every 30 seconds:

<meta http-equiv="refresh" content="30">

Example 5 – Setting the viewport to make your website look good on all devices:

<meta name="viewport" content="width=device-width, initial-scale=1.0">

 

Join Telegram Join Whatsapp