

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Why do we use head tag in HTML Page?
The <head> tag is a container for all the head elements in an HTML page. To add a <head>…</head> the tag is quite easy. Add the title of the document under it or meta information, styles, scripts, etc.
Just keep in mind, the <title>…</title> tags gets added inside the <head>…</head> tags.
Example
You can try to run the following code to add the <head> tag in an HTML page,
<!DOCTYPE html> <html> <head> <title>HTML head tag</title> </head> <body> <h2>Working with HTML head tag</h2> <p>This is demo text.</p> <p>Displaying how head tag is used in HTML. Add title in it or meta information about the document.</p> </body> </html>
Output
- Related Questions & Answers
- HTML <head> Tag
- Why do we use DOCTYPES in HTML document?
- How to use title tag in HTML Page?
- Why do we use reset button in HTML forms?
- Why do we use the novalidate attribute in HTML?
- How to use Meta Tag to redirect an HTML page?
- Why do we use interfaces in Java?
- Why do we use random.seed() in Python?
- Why do we use pandas in python?
- Why do we use jQuery over JavaScript?
- Why do we use JSON.stringify() method in jQuery?
- Why do we use modifiers in C/C++?
- Why do we use restrict qualifier in C++?
- Why do we use const qualifier in C++?
- Why do we use comma operator in C#?
Advertisements