<head> element in HTML is a container for metadata and other non-visible elements that are included in an HTML document. It is located between the opening
<html> tag and the opening
Here are some common elements that can be included in the head of an HTML document:
<title>: This element is used to specify the title of the document, which is displayed in the browser’s title bar.
<meta>: This element is used to provide additional information about the document, such as the character encoding, keywords for search engines, and descriptions for social media sharing.
<link>: This element is used to link to external resources such as stylesheets and icons.
<style>: This element is used to define styles for the document, either in the head or in-line in the HTML.
Here is an example of a basic HTML document with a head element:
<!DOCTYPE html> <html> <head> <title>My Website</title> <meta charset="UTF-8"> <meta name="description" content="This is my website."> <link rel="stylesheet" href="style.css"> </head> <body> <h1>Welcome to my website</h1> <p>This is the main content of my website.</p> <script src="script.js"></script> </body> </html>