

{"id":78928,"date":"2020-07-04T09:00:47","date_gmt":"2020-07-04T03:30:47","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=78928"},"modified":"2024-07-24T17:02:44","modified_gmt":"2024-07-24T11:32:44","slug":"html-head-elements","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/html-head-elements\/","title":{"rendered":"HTML Head Elements &#8211; Usage, Attributes and Examples"},"content":{"rendered":"<p>Welcome to <strong>DataFlair HTML Head Tutorial<\/strong>. In this article, we will learn what are HTML head elements, its attributes and examples.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/HTML-Head-df.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-78999\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/HTML-Head-df.jpg\" alt=\"HTML Head\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/HTML-Head-df.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/HTML-Head-df-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/HTML-Head-df-1024x536.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/HTML-Head-df-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/HTML-Head-df-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/HTML-Head-df-520x272.jpg 520w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><\/p>\n<h2>HTML Head Elements<\/h2>\n<p>The information related to the HTML document is defined in the head section or the &lt;head&gt; element of the document. It was mandatory to use &lt;head&gt; element up till HTML4, but this rule has been omitted in HTML5. The information contained by the &lt;head&gt; element is not displayed by the browser on the web-page. It includes machine-readable information such as style sheets, scripts, title of the document, etc.<\/p>\n<p>In modern web development, the head section of a web page contains essential meta-information that is vital for SEO analysis, accessibility, and performance. Thus by including a proper and accurate metadata, the developers of the websites can enhance their web pages\u2019 status in search engines, guarantee the website accessibility by users, and increase the efficiency of the internet sites\u2019 work through proper link to the external resources.<\/p>\n<p>Furthermore, elements placed within the head can aid in defining how the document must be displayed in various browsers and on different gadgets.<\/p>\n<p><strong>Syntax-<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&lt;html&gt;\r\n&lt;head&gt;...&lt;\/head&gt;\r\n&lt;html&gt;\r\n<\/pre>\n<p><strong>Example-<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&lt;!DOCTYPE HTML&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n &lt;meta content=\"Example\" name=\"description\"&gt;\r\n &lt;title&gt;DataFlair&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n &lt;p&gt;Welcome to DataFlair&lt;\/p&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p><strong>Output-<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-1basic-example-1-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79000\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-1basic-example-1-1.png\" alt=\"html head elements\" width=\"244\" height=\"85\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-1basic-example-1-1.png 244w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-1basic-example-1-1-150x52.png 150w\" sizes=\"auto, (max-width: 244px) 100vw, 244px\" \/><\/a><\/p>\n<p>The elements contained within the &lt;head&gt; element are-<\/p>\n<h3>1. HTML &lt;title&gt;<\/h3>\n<p>The &lt;title&gt; element resides in the &lt;head&gt; tag and defines the name of the web page. It appears as the name of the tab. The title is displayed during search results.<\/p>\n<p><strong>Code-<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;DataFlair&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;h1&gt;Welcome to DataFlair&lt;\/h1&gt;\r\n&lt;img src=\"DataFlair.png\" height=\"200px\" width=\"200px\"&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p><strong>Output-<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-2title.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79001\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-2title.png\" alt=\"html title tag\" width=\"399\" height=\"300\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-2title.png 399w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-2title-300x226.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-2title-150x113.png 150w\" sizes=\"auto, (max-width: 399px) 100vw, 399px\" \/><\/a><\/p>\n<h3>2. HTML &lt;style&gt;<\/h3>\n<p>The &lt;style&gt; tag contains the CSS files or the implicit CSS attributes, used for styling and manipulating the HTML document.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;DataFlair&lt;\/title&gt;\r\n&lt;style&gt;\r\n  h1{\r\n    color: blue;\r\n    background-color: red;\r\n  }\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;h1&gt;Welcome to DataFlair&lt;\/h1&gt;\r\n&lt;img src=\"DataFlair.png\" height=\"200px\" width=\"200px\"&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p><strong>Output-<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-3style.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79002\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-3style.png\" alt=\"html style tag\" width=\"549\" height=\"308\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-3style.png 549w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-3style-300x168.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-3style-150x84.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-3style-520x292.png 520w\" sizes=\"auto, (max-width: 549px) 100vw, 549px\" \/><\/a><\/p>\n<h3>3. HTML &lt;link&gt;<\/h3>\n<p>This tag links the current document with other web pages or external style sheets.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;DataFlair&lt;\/title&gt;\r\n&lt;link rel=\"stylesheet\" type=\"text\/css\" href=\"style.css\"&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;h1&gt;Welcome to DataFlair&lt;\/h1&gt;\r\n&lt;img src=\"DataFlair.png\" height=\"200px\" width=\"200px\"&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p><strong>Output-<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-4link.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79003\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-4link.png\" alt=\"html link tag\" width=\"549\" height=\"300\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-4link.png 549w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-4link-300x164.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-4link-150x82.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-4link-520x284.png 520w\" sizes=\"auto, (max-width: 549px) 100vw, 549px\" \/><\/a><\/p>\n<h3>4. HTML &lt;meta&gt;<\/h3>\n<p>The &lt;meta&gt; tag contains additional information related to the document such as page description, keywords, author, character set, etc. The web browsers use the metadata to display content, and keywords are used by search engines and other web-services.<\/p>\n<p>Meta tags are exceptionally essential for passing vital information to the web crawlers and browsers about the key elements of an HTML document, including character set used in the current document to ensure proper displaying of the text. They also have the function of social media integration by supplying information such as Open Graph tags that determine the manner in which URLs appear on social media sites.<\/p>\n<ul>\n<li><strong>Character Set<\/strong><br \/>\n&lt;meta charset=&#8221;UTF-8&#8243;&gt;<\/li>\n<li><strong>Description of the web-page<\/strong><br \/>\n&lt;meta name=&#8221;description&#8221; content=&#8221;E-learning&#8221;&gt;<\/li>\n<li><strong>Keywords<\/strong><br \/>\n&lt;meta name=&#8221;keywords&#8221; content=&#8221;HTML, CSS,JavaScript&#8221;&gt;<\/li>\n<li><strong>Author<\/strong><br \/>\n&lt;meta name=&#8221;author&#8221; content=&#8221;DataFlair&#8221;&gt;<\/li>\n<li><strong>Refresh document every 20 seconds<\/strong><br \/>\n&lt;meta http-equiv=&#8221;refresh&#8221; content=&#8221;20&#8243;&gt;<\/li>\n<\/ul>\n<p>For example,<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n  &lt;meta charset=\"UTF-8\"&gt;\r\n  &lt;meta name=\"description\" content=\"E-Learning\"&gt;\r\n  &lt;meta name=\"keywords\" content=\"HTML,CSS,JavaScript\"&gt;\r\n  &lt;meta name=\"author\" content=\"DataFlair\"&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;p&gt;Welcome to DataFlair.&lt;\/p&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<h4>Setting viewport using &lt;meta&gt; tag<\/h4>\n<p>The way a web-page is displayed on a smaller and larger device would vary as per the device\u2019s size. The meta viewport element gives the browser the necessary instructions on how to set the dimensions and scaling of the web-page.<\/p>\n<p><strong>Syntax-<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\r\n<\/pre>\n<p>The width=device-width sets the width of the web-page as per the size of the device. The initial-scale=1.0 sets the initial zoom of the web-page when it is first loaded.<br \/>\n&lt;script&gt;<br \/>\nThe &lt;script&gt; tag contains the important client-side script files used to perform dynamic tasks on the HTML element.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;External Script&lt;\/title&gt;\r\n&lt;script&gt;\r\n  function myFunction() {\r\n   alert(\"Hello, World\");\r\n}\r\n&lt;\/script&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;input type = \"button\" onclick = \"myFunction();\" name = \"okay\" value = \"Click\"&gt; &lt;\/input&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p><strong>Output-<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-5setting-viewport.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79004\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-5setting-viewport.png\" alt=\"html setting viewport\" width=\"1254\" height=\"223\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-5setting-viewport.png 1254w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-5setting-viewport-300x53.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-5setting-viewport-1024x182.png 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-5setting-viewport-150x27.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-5setting-viewport-768x137.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-5setting-viewport-520x92.png 520w\" sizes=\"auto, (max-width: 1254px) 100vw, 1254px\" \/><\/a><\/p>\n<h3>5. HTML &lt;base&gt;<\/h3>\n<p>All the links on a web page will be rendered to a default web page whose URL is specified in the &lt;base&gt; element.<\/p>\n<p><strong>Code-<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n  &lt;title&gt;Page Title&lt;\/title&gt;\r\n  &lt;base href=\"images\/\" target=\"_blank\"&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;img src=\"rainy.gif\"&gt;\r\n&lt;p&gt;Because of the base URL, the browser looks for the image \"rainy.gif\" at \"images\/html5.gif\"&lt;\/p&gt;\r\n\r\n&lt;p&gt;&lt;a href=https:\/\/data-flair.training\/&gt;DataFlair&lt;\/a&gt;&lt;\/p&gt;\r\n&lt;p&gt;The link above opens in a new window because the base target is set to \"_blank\".&lt;\/p&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p><strong>Output-<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-6base.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79005\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-6base.png\" alt=\"html base tag\" width=\"761\" height=\"502\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-6base.png 761w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-6base-300x198.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-6base-150x99.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/image-6base-520x343.png 520w\" sizes=\"auto, (max-width: 761px) 100vw, 761px\" \/><\/a><\/p>\n<h3>6. &lt;noscript&gt;<\/h3>\n<p>This tag is used to generate an alternate text if the script is not supported by the user or has been disabled. For example,<\/p>\n<p><strong>Code-<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&lt;html&gt;\r\n&lt;body&gt;\r\n&lt;h1&gt;JavaScript&lt;\/h1&gt;\r\n&lt;p&gt;JavaScript to change the content of an HTML element:&lt;\/p&gt;\r\n&lt;button type=\"button\" onclick=\"myFunction()\"&gt;Click&lt;\/button&gt;\r\n&lt;p id=\"demo\"&gt;Initially&lt;\/p&gt;\r\n&lt;script&gt;\r\nfunction myFunction() { \r\n  document.getElementById(\"demo\").innerHTML = \"Hello World!\";\r\n}\r\n&lt;\/script&gt;\r\n&lt;noscript&gt;\r\nYour browser does not support JavaScript\r\n&lt;\/noscript&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<h2>Attributes of HTML &lt;head&gt; Element<\/h2>\n<table>\n<tbody>\n<tr>\n<td><b>Attribute<\/b><\/td>\n<td><b>Value<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">profile<\/span><\/td>\n<td><span style=\"font-weight: 400\">URL<\/span><\/td>\n<td><span style=\"font-weight: 400\">Used to specify the URL of the meta-data. Deprecated in HTML5.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">media<\/span><\/td>\n<td><span style=\"font-weight: 400\">media_query<\/span><\/td>\n<td><span style=\"font-weight: 400\">Used to specify the device\/media, the media resource is optimized for.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">type<\/span><\/td>\n<td><span style=\"font-weight: 400\">text\/css<\/span><\/td>\n<td><span style=\"font-weight: 400\">Used to specify the type of file within the &lt;style&gt; element.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Summary<\/h2>\n<p>In this article, we\u2019ve discussed the &lt;head&gt; element of HTML5. HTML &lt;head&gt; element contains the additional information related to the HTML document. This information is not displayed by the browsers but gives it the necessary instructions required for rendering the web-page.<br \/>\nThe &lt;head&gt; element is the container for various other elements such as &lt;title&gt;, &lt;style&gt;, &lt;script&gt;, &lt;link&gt;, &lt;meta&gt; and &lt;base&gt;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to DataFlair HTML Head Tutorial. In this article, we will learn what are HTML head elements, its attributes and examples. HTML Head Elements The information related to the HTML document is defined in&#46;&#46;&#46;<\/p>\n","protected":false},"author":10,"featured_media":78999,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22400],"tags":[22520,22521],"class_list":["post-78928","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-html","tag-html-head","tag-html-head-elements"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>HTML Head Elements - Usage, Attributes and Examples - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn HTML Head Elements, their attributes like title, profile, media, type, noscript, base, script, viewport, meta tga, link tag, style etc with examples.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/html-head-elements\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"HTML Head Elements - Usage, Attributes and Examples - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn HTML Head Elements, their attributes like title, profile, media, type, noscript, base, script, viewport, meta tga, link tag, style etc with examples.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/html-head-elements\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-04T03:30:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-24T11:32:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/HTML-Head-df.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"HTML Head Elements - Usage, Attributes and Examples - DataFlair","description":"Learn HTML Head Elements, their attributes like title, profile, media, type, noscript, base, script, viewport, meta tga, link tag, style etc with examples.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/html-head-elements\/","og_locale":"en_US","og_type":"article","og_title":"HTML Head Elements - Usage, Attributes and Examples - DataFlair","og_description":"Learn HTML Head Elements, their attributes like title, profile, media, type, noscript, base, script, viewport, meta tga, link tag, style etc with examples.","og_url":"https:\/\/data-flair.training\/blogs\/html-head-elements\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2020-07-04T03:30:47+00:00","article_modified_time":"2024-07-24T11:32:44+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/HTML-Head-df.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/html-head-elements\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/html-head-elements\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/a90b082e16aa38d207212d22b0581f33"},"headline":"HTML Head Elements &#8211; Usage, Attributes and Examples","datePublished":"2020-07-04T03:30:47+00:00","dateModified":"2024-07-24T11:32:44+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/html-head-elements\/"},"wordCount":751,"commentCount":1,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/html-head-elements\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/HTML-Head-df.jpg","keywords":["HTML Head","HTML Head elements"],"articleSection":["HTML Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/html-head-elements\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/html-head-elements\/","url":"https:\/\/data-flair.training\/blogs\/html-head-elements\/","name":"HTML Head Elements - Usage, Attributes and Examples - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/html-head-elements\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/html-head-elements\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/HTML-Head-df.jpg","datePublished":"2020-07-04T03:30:47+00:00","dateModified":"2024-07-24T11:32:44+00:00","description":"Learn HTML Head Elements, their attributes like title, profile, media, type, noscript, base, script, viewport, meta tga, link tag, style etc with examples.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/html-head-elements\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/html-head-elements\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/html-head-elements\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/HTML-Head-df.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/HTML-Head-df.jpg","width":1200,"height":628,"caption":"HTML Head"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/html-head-elements\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"HTML Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/html\/"},{"@type":"ListItem","position":3,"name":"HTML Head Elements &#8211; Usage, Attributes and Examples"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/a90b082e16aa38d207212d22b0581f33","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/dd6de0d647a0185cd6faf264e4ba860b0d85d08d7070766f9cd41bea5bb0b227?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/dd6de0d647a0185cd6faf264e4ba860b0d85d08d7070766f9cd41bea5bb0b227?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dd6de0d647a0185cd6faf264e4ba860b0d85d08d7070766f9cd41bea5bb0b227?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"The DataFlair Team is passionate about delivering top-notch tutorials and resources on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. With expertise in the tech industry, we simplify complex topics to help learners excel. Stay updated with our latest insights.","url":"https:\/\/data-flair.training\/blogs\/author\/dfadteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/78928","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=78928"}],"version-history":[{"count":4,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/78928\/revisions"}],"predecessor-version":[{"id":142895,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/78928\/revisions\/142895"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/78999"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=78928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=78928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=78928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}