TOP CATEGORIES

×

What is the head section in HTML?

B

Bright Madhu

<head> Section n HTML

The <head> section is a crucial part of the HTML document that is placed between the opening <html> tag and the opening <body> tag and it contains metadata, document title, linked resources, and other information about the HTML document.

Actually, The <head> section is primarily used to provide essential information and resources that enhance the document structure, presentation, and behavior. For more understanding, here is the full explanation of the <head> section in detail one by one. 

All Tag, Used in HTML <head> Section

  • <title>: It is used to specify the title of the HTML document that appears as the title of the browser window or tab when the webpage is opened.
  • <meta>: It is used to define various metadata about the HTML document, such as character encoding, viewport settings for mobile responsiveness, author information, description, and keywords for search engines.
  • <link>: It is used to establish relationships between the current HTML document and external resources that are commonly used to link external CSS stylesheets, icon files (favicon), or other external resources.
  • <style>: It is used to define CSS styles directly within the HTML document. CSS rules placed within the <style> tags will be applied to the content of the HTML document.
  • <script>: It is used to embed or reference JavaScript code within the HTML document. It can be placed in the <head> section or at the end of the <body> section to control the timing of script execution.

Basic Syntax Layout of <head> Section

<!DOCTYPE html>

<html>

<head>

    <meta charset="UTF-8">

    <title>Page Title</title>

    <link rel="stylesheet" href="styles.css">

    <script src="script.js"></script>

</head>

<body></body>

</html>

1 votes

Your Answer

Email: advertise@gdatamart.com

Donate: To Support US

© 2024 GDATAMART.COM (All Rights Reserved)