
- Javascript Basics Tutorial
- Javascript - Home
- Javascript - Overview
- Javascript - Syntax
- Javascript - Enabling
- Javascript - Placement
- Javascript - Variables
- Javascript - Operators
- Javascript - If...Else
- Javascript - Switch Case
- Javascript - While Loop
- Javascript - For Loop
- Javascript - For...in
- Javascript - Loop Control
- Javascript - Functions
- Javascript - Events
- Javascript - Cookies
- Javascript - Page Redirect
- Javascript - Dialog Boxes
- Javascript - Void Keyword
- Javascript - Page Printing
- JavaScript Objects
- Javascript - Objects
- Javascript - Number
- Javascript - Boolean
- Javascript - Strings
- Javascript - Arrays
- Javascript - Date
- Javascript - Math
- Javascript - RegExp
- Javascript - HTML DOM
- JavaScript Advanced
- Javascript - Error Handling
- Javascript - Validations
- Javascript - Animation
- Javascript - Multimedia
- Javascript - Debugging
- Javascript - Image Map
- Javascript - Browsers
- JavaScript Useful Resources
- Javascript - Questions And Answers
- Javascript - Quick Guide
- Javascript - Functions
- Javascript - Resources
How to create a valid HTML document with no element?
With HTML, the essentials are doctype declaration, <html><head> and </body>. But, you will be amazed to know that a valid HTML document can work without the <head> element. The doctype declaration<!DOCTYPE html> will come always since it tells and instructs the browser about what the page is about.
Let’s see an example; here we won’t use the <head> tag. Still, the HTML Document is valid and will work correctly like any other valid HTML Document
Example
<!DOCTYPE html> <html> <title>Title of the document</title> <body> <h1>This is heading 1</h1> <p>This is demo text.</p> </body> </html>
- Related Articles
- How to create a valid HTML document with no and element?
- How to create an HTML Document?
- How to create a section in a document in HTML?
- Create HTML Document with Custom URL for the document in JavaScript
- How to create a draggable HTML element with JavaScript and CSS?
- How to create a hyperlink to link another document in HTML?
- How to send a cross-document message with HTML?
- How to create a Bibliography with HTML?
- Create editable content in an HTML document
- How to create a Test Strategy Document?
- How to create a sticky element with CSS?
- How to create a download link with HTML?
- How to get head element from ArrayBlockingQueue in android?
- How to create a dialog with “yes” and “no” options in JavaScript?
- Execute a script when an element has been dragged to a valid drop target in HTML?

Advertisements