- Trending Categories
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 properly use h1 in HTML5?
h1 is a heading and not a title. Youcan gives own heading element to each sectioning element. h1 cannot be the title. It can be the heading of that particular section of the page. Each article can have its own title. <h1> defines the most important heading. The first <h1> element is considered the label for the entire document.
It is perfectly fine to use as many <h1> tags as your document calls for; that is one per sectioning root or content section. Use one set of <h1> tags per sectioning root or content section. There should always be an <h1> level heading between the opening <body> tag and the first content section, to label the overall document.
Example
<body> <h1>Heading 1</h1> <p>My content </p> <h2>Heading of a subsection</h2> <p>My content </p> <h2>Another subsection </h2> <p>content</p> <body>
Advertisements