C Books Guide and List
C++ Books Guide and List
Best Java Books

3,749 questions

4,049 answers

114 comments

10,705 users

How to use <section> tag?

0 votes
15 views
asked by rock Expert (14,990 points)

1 Answer

0 votes
The section element is new to HTML5 and marks a section of a document.
 
Example
 
<!DOCTYPE HTML>
<html> 
<head> 
<style> 
section{ 
   background: grey; 
   color: white; 
   font-size: 1em; 
   margin-top: 0px;
</style> 
</head> 
<body> 
    <section> 
        <hgroup> 
            <h1>H1</h1> 
            <h2>H2</h2> 
        </hgroup> 
        <section> 
            <h1>H1 of section</h1> 
            <p>This is a paragraph.</p>
        </section> 
    </section> 
</body> 
</html>
 
answered by augustaina Sr Member (4,820 points)

Related questions

0 votes
1 answer 42 views
42 views asked by rock Expert (14,990 points)
0 votes
1 answer 33 views
33 views asked by rock Expert (14,990 points)
0 votes
1 answer 31 views
31 views asked by rock Expert (14,990 points)
0 votes
1 answer 28 views
28 views asked by smith Geek (15,340 points)
0 votes
1 answer 30 views
30 views asked by smith Geek (15,340 points)
...