- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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>
Advertisements