Elements that are used in head section of HTML page Last Updated : 15 Oct, 2020 Comments Improve Suggest changes Like Article Like Report The <head> element is like a container for metadata i.e. data about data and it also lies between the <html> tag and the <body> tag. Metadata is the data about the HTML document and is not displayed on the webpage. It defines the document title, style, script, and other meta information. The HTML <head> element is a container for the following elements: <title>, <link>, <meta>, <base>, <style>, <script>, ... etc. <title> element: The <title> element defines the title of the webpage. The title must be in text and we will be able to see the title in the page tabs of the browser. Why it is used: The page title is used by the search engine to decide the order while listing pages in the search result. So, using meaningful and accurate title helps you to rank better by the SEO. html <!DOCTYPE html> <html lang="en"> <head> <title>HTML Head Tag </title> </head> <body> <p>GeeksforGeeks is a portal for geeks.</p> <hr> </body> </html> Output: <link> element: The <link> tag is most often used to link an external CSS file. It defines the relationship between current document and external resources. html <!DOCTYPE html> <html> <head> <link rel="stylesheet" type="text/css" href="mystyle.css"> </head> <body> <h1>GeeksforGeeks</h1> <p>It is a portal for geeks.</p> </body> </html> Output: <meta> element: The <meta> element is used to specify the Character set, Page description, Keywords, Author of the document and Viewport settings. The meta data will not be displayed but are used by browsers on how to display content or reload page and by search engine, and other web services. html <!DOCTYPE html> <html> <head> <title>meta tag examples</title> <meta name = "keywords" content = "Meta Tags, Metadata"/> </head> <body> <p>Hello GeeksforGeeks!</p> </body> </html> Output: Hello GeeksforGeeks! <base> element: The <base> element is used to specify the base URL or target for relative URLs. There can only be only one <base> element in a document. html <!DOCTYPE html> <html> <head> <!-- Declaring the BASE URL --> <base href= "https://media.geeksforgeeks.org/wp-content/uploads/" target="_blank"> </head> <body> <img src="1-95.jpg" width="400" height="250"> </body> </html> Output: <style> element: The <style> element is used to make internal CSS within our HTML webpage. We can modify text and view of our web page using various properties and its values. Some of the properties include background-color, text align etc. html <!DOCTYPE html> <html> <head> <style> body { background: skyblue; } h1 { color: red; } p { color: blue; } </style> </head> <body> <h1>GeeksforGeeks</h1> <p>It is a portal for geeks.</p> </body> </html> Output: <script> element: The <script> element is used to define within the HTML webpage. For example the following JavaScript code writes "GeeksforGeeks" into an HTML element with id="demo". html <!DOCTYPE html> <html> <head> <title>script tag</title> <style> body { text-align:center; } h1 { color:green; } </style> </head> <body> <h1>GeeksforGeeks</h1> <h2><script> Tag</h2> <p id="Geeks"></p> <script> document.getElementById("Geeks").innerHTML = "Hello GeeksforGeeks!"; </script> </body> </html> Output: Comment More infoAdvertise with us Next Article Elements that are used in head section of HTML page koushikd1590 Follow Improve Article Tags : Web Technologies HTML HTML-Tags HTML-Misc Similar Reads What are various heading elements used to add heading in HTML ? An HTML heading tag is used to define the headings of a page. There are six levels of headings defined by HTML. These 6 heading elements are H1, H2, H3, H4, H5, and H6; with H1 being the highest level and H6 the least. In this article, we will discuss various heading elements used to add a heading i 2 min read Is HTML elements are same as tags or not ? HTML elements and tags are a lot different. Let's see what HTML elements and Tags actually are and their differences. The below image tells about HTML Elements and HTML Tags. HTML Tags: The starting and ending point parts of an HTML document are HTML Tags, which start with < (less than) and end w 2 min read What are empty elements in HTML ? An empty element is a component that doesn't have any embedded elements or text elements. Empty tags contain only the opening tag but they perform some action in the webpage. For example, <br> tag is an empty tag. In this article, we will see the empty tags in HTML & we will also focus on 3 min read How to define header for a document or section using HTML ? The <header> tag in HTML is used to define the header for a document or a section. It contains information related to the title and heading of the related content. The <header> element is intended to usually contain the sectionâs heading (an h1-h6 element or an <hgroup> element), b 2 min read Tags vs Elements vs Attributes in HTML In HTML, tags represent the structural components of a document, such as <h1> for headings. Elements are formed by tags and encompass both the opening and closing tags along with the content. Attributes provide additional information or properties to elements, enhancing their functionality or 2 min read Like