10 Jul HTML5 aside Tag
If you want to keep related content, such as glossary, author profile aside, then use the HTML5 aside tag. The aside tag adds a separate section on the page it is placed in. Here’s the structure how <aside> is used,
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<!DOCTYPE html> <html> <head> <title></title> </head> <body> <aside> … </aside> </body>] </html> |
Example
Here’s an example showing the working of the HTML5 <aside> element,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
<!DOCTYPE html> <html> <head> <title>Understanding HTML aside tag</title> </head> <body> Limited overs cricket is played in the form of ODI and T20. <aside> <h2>One Day International (ODI)</h2> <p>It is a form of cricket played between two teams. The overs are limited (fixed) and the match has international status. It goes on for a day.</p> </aside> <aside> <h2>T20</h2> <p>It is a form of cricket played between two teams. The overs are limited (20) and the match has international status. It goes on for a day.</p> </aside> </body> </html> |
Here’s the output,
No Comments