Home / Articles / Programming languages / Markup languages / HTML & CSS / HTML5: changing the structure of the document

HTML5: changing the structure of the document

HTML5: changing the structure of the document
 
Authors: Daisy Smith
HTML5: changing the structure of the document
  • Currently 0 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Rating: 0/5 (0 votes cast)

Thank you for rating!

You have already rated this page, you can only rate it once!

Your rating has been changed, thanks for rating!

Log in or create a user account to rate this page.


Why change the structure of the document? In order for the document to have a correct code and only necessary elements. As an example, let's take the headers h1 and h2. What one should do if h2 was not supposed to be part of this structure?

The solution of this problem is quite simple. You must add element hgroup, which should contain both h1 and h2. This element hides all the headers in your document, except one - h1.

<hgroup>
  <h2>Formatting headers and paragraphs</h2>
  <h1>Settings page paraments</h1>
</hgroup>

In this example only the text that is in h1 will be displayed.

Changing the order of these elements makes no difference. When elements are displayed only the element with the highest rating is taken into account - in this case it's h1.


 

Read also

HTML5: adding new elements

HTML5: adding new elements

HTML5: elements article and section

HTML5: elements article and section

Post comment

basicuse.net
html5_css
106160485398655174790

Quick navigation

General navigation