
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
How to create a valid HTML document with no and 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 <html><body> and <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 html><body> and <head> element. Still, the HTML Document is valid and will work correctly like any other valid HTML Document −
<!DOCTYPE html> <title>Title of the page</title> <h1>This is heading 1</h1> <h2>This is heading 2 </h2> <p>This is a paragraph.</p>
- Related Articles
- How to create a valid HTML document with no element?
- How to create an HTML Document?
- How to create a draggable HTML element with JavaScript and CSS?
- 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 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
- HTML DOM head property
- How to create a signup form with HTML and CSS?
- How to create a weight converter with HTML and JavaScript?
- How to create a temperature converter with HTML and JavaScript?
- How to create a length converter with HTML and JavaScript?
- How to create a speed converter with HTML and JavaScript?

Advertisements