|
| ||||||||||
| Tags: html4, html5, xhtml |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| ||||
| ||||
| Tips to learn HTML5 quickly
HTML5 doctype is simple: Old ways: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> or <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> New way: <!doctype html> Meta charset tag is simple: Old way: <meta http-equiv="Content-Type" content="text/html; charset=UTF- 8" /> New way: <meta charset="UTF-8"> There are a number of new structural elements in HTML5 for defining documents. Below is an example of Main Structural Elements that you will be using mostly. <header> <nav> <section> <article> <aside> <footer> One can have 3 sections in a page and each section can have their own header and footer. You might be familiar with divs, classes and ids in HTML4 or XHTML, you can use them in HTML5 for styling purpose. Let’s start with a basic code in HTML5 having top header, One menu for navigation, one content section with some articles, one sidebar and a footer. <!doctype html> <html> <head> <meta charset="utf-8"> <title>A basic code in HTML5</title> <!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]--> <style>header, footer, section, aside, nav, article {display: block;}</style> </head> <body> <nav> <ul> <li><a href="#">Forum</a></li> <li><a href="#">About us </a></li> <li><a href="#"> What’s new </a></li> <li><a href="#">Contact Us</a></li> </ul> </nav> <header> <h1><a href="#">A basic code in HTML5</a></h1> <h2>Tag line </h2> </header> <section> <article> <h3><a href="#">Article 1</a></h3> <img src="C:\Documents and Settings\abc\Desktop\abc.jpg" alt="ABC"> <p>Tips to learn HTML5 quickly</p> </article> <article> <h3><a href="#">Article 2</a></h3> <img src=" C:\Documents and Settings\abc\Desktop\123.jpg " alt="123"> <p> Tips to learn HTML5 quickly</p> </article> </section> <aside> <h4>Follow Us</h4> <ul> <li><a href="#">Twitter</a></li> <li><a href="#">Facebook</a></li> </ul> </aside> <footer> <p>Copyright@ abc </p> </footer> </body> </html> Definition:
![]() |
|
#2
| ||||
| ||||
| Re: Tips to learn HTML5 quickly
Below is the list of new elements that have been added in HTML5:
|
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Tips to learn HTML5 quickly" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Is it worth to go for HTML5 right now | klinsmann | Software Development | 7 | 3 Weeks Ago 02:18 PM |
| HTML5 for Beginners | Andrew | Guides & Tutorials | 2 | 10-10-2012 03:02 PM |
| Tips and Tricks for Pet Society game to quickly get Paw Points and money | The-Tiago | Video Games | 4 | 03-03-2011 09:43 AM |
| HTML5 WebSocket | Bruno007 | Software Development | 2 | 14-12-2010 05:49 AM |
| Want to know about html5 | Charites | Windows Software | 3 | 22-11-2010 01:29 PM |