HTML5

From Omnia
Jump to navigation Jump to search

HTML5

HTML5 - Wikipedia - http://en.wikipedia.org/wiki/HTML5

HTML5 is a language for structuring and presenting content for the World Wide Web, and is a core technology of the Internet originally proposed by Opera Software. It is the fifth revision of the HTML standard (created in 1990 and standardized as HTML4 as of 1997) and as of December 2011 is still under development. Its core aims have been to improve the language with support for the latest multimedia while keeping it easily readable by humans and consistently understood by computers and devices (web browsers, parsers, etc.). HTML5 is intended to subsume not only HTML 4, but XHTML 1 and DOM2HTML (particularly JavaScript) as well.

Template

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>untitled</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" type="text/css" href="style.css" />
  </head>
  <body>
  </body>
</html>

sample style.css:

body { 
  font-size: x-large;
}

Validation

W3C Markup Validation Service http://validator.w3.org/

Link Checker

W3C Link Checker - http://validator.w3.org/checklink/

forms

fieldset

grouping items with a border:

<form method="get" action="simpleform.html">
<fieldset>
<legend>All About You</legend>
    <p>
      <label for="yourname">Enter your name:</label>
      <input type="text" name="yourname" id="yourname"/>
    </p>
    <p><input type="submit"/></p>
</fieldset>
</form>

'fieldset' groups, 'legend' displays legend.

font tag

Do not use font tags! Use CSS instead.

CSS

See CSS

Upload File

<form id="upload" action="upload.php" method="POST" enctype="multipart/form-data">  
<fieldset>  
<legend>HTML File Upload</legend>  
<input type="hidden" id="MAX_FILE_SIZE" name="MAX_FILE_SIZE" value="300000" />  
<div>  
    <label for="fileselect">Files to upload:</label>  
    <input type="file" id="fileselect" name="fileselect[]" multiple="multiple" />  
</div>  
<div id="submitbutton">  
    <button type="submit">Upload Files</button>  
</div>  
</fieldset>  
</form>

Source: How to Asynchronously Upload Files Using HTML5 and Ajax - SitePoint - http://www.sitepoint.com/html5-ajax-file-upload/

keywords