Transcription of HTML5 Quick Guide - Tutorialspoint
1 - Quick GUIDEHTML5 - Quick GUIDEHTML5 - OVERVIEWHTML5 - OVERVIEWHTML5 is the next major revision of the html standard superseding html , XHTML , andXHTML HTML5 is a standard for structuring and presenting content on the World Wide is a cooperation between the World Wide Web Consortium W3C and the Web HypertextApplication Technology Working Group new standard incorporates features like video playback and drag-and-drop that have beenpreviously dependent on third-party browser plug-ins such as Adobe Flash, Microsoft Silverlight,and Google SupportThe latest versions of Apple Safari, Google Chrome, Mozilla Firefox, and Opera all support manyHTML5 features and Internet Explorer will also have support for some HTML5 mobile web browsers that come pre-installed on iPhones, iPads, and Android phones all haveexcellent support for FeaturesHTML5 introduces a number of new elements and attributes that helps in building a modernwebsite.
2 Following are great features introduced in Semantic Elements These are like <header>, <footer>, and <section>.Forms Improvements to html web forms where new attributes have been introducedfor <input> Local Storage To achieve without resorting to third-party A a next-generation bidirectional communication technology for Events HTML5 introduces events which flow from web server to the webbrowsers and they are called Server-Sent Events This supports a two-dimensional drawing surface that you can program & Video You can embed audio or video on your web pages without resorting tothird-party Now visitors can choose to share their physical location with your This lets you create your own vocabularies beyond HTML5 and extend yourweb pages with custom and drop Drag and drop the items from one location to another location on a thesame CompatibilityHTML5 is designed, as much as possible.
3 To be backward compatible with existing web features build on existing features and allow you to provide fallback content for is suggested to detect support for individual HTML5 features using a few lines of you are not familiar with any previous version of html , I would recommend to go through ourHTML Tutorial before you explore further concepts of - SYNTAXHTML5 - SYNTAXThe html 5 language has a "custom" html syntax that is compatible with html 4 and XHTML1documents published on the Web, but is not compatible with the more esoteric SGML features ofHTML 5 does not have the same syntax rules as XHTML where we needed lower case tag names,quoting our attributes,an attribute had to have a value and to close all empty HTML5 is coming with lots of flexibility and would support the followings Uppercase tag are optional for values are empty elements are DOCTYPEDOCTYPEs in older versions of html were longer because the html language was SGML basedand therefore required a reference to a 5 authors would use simple syntax to specify DOCTYPE as follows <!
4 DOCTYPE html >All the above syntax is EncodingHTML 5 authors can use simple syntax to specify Character Encoding as follows <meta charset="UTF-8">All the above syntax is <script> tagIt's common practice to add a type attribute with a value of "text/javascript" to script elements asfollows <script type="text/javascript" src=" "> </script> html 5 removes extra information required and you can use simply following syntax <script src=" "> </script>The <link> tagSo far you were writing <link> as follows <link rel="stylesheet" type="text/css" href=" "> html 5 removes extra information required and you can use simply following syntax <link rel="stylesheet" href=" "> HTML5 ElementsHTML5 elements are marked up using start tags and end tags. Tags are delimited using anglebrackets with the tag name in difference between start tags and end tags is that the latter includes a slash before the is the example of an HTML5 element <p>.
5 </p> HTML5 tag names are case insensitive and may be written in all uppercase or mixed case,although the most common convention is to stick with lower of the elements contain some content like <p>..</p> contains a paragraph. Some elements,however, are forbidden from containing any content at all and these are known as void example, br, hr, link and meta is a complete list of HTML5 AttributesElements may contain attributes that are used to set various properties of an attributes are defined globally and can be used on any element, while others are defined forspecific elements only. All attributes have a name and a value and look like as shown below in is the example of an HTML5 attributes which illustrates how to mark up a div elementwith an attribute named class using a value of "example" <div >..</div>Attributes may only be specified within start tags and must never be used in end attributes are case insensitive and may be written in all upper case or mixed case,although the most common convention is to stick with lower is a complete list of HTML5 DocumentThe following tags have been introduced for better structure section This tag represents a generic document or application section.
6 It can be usedtogether with h1-h6 to indicate the document This tag represents an independent piece of content of a document, such as a blogentry or newspaper This tag represents a piece of content that is only slightly related to the rest of This tag represents the header of a This tag represents a footer for a section and can contain information about theauthor, copyright information, This tag represents a section of the document intended for This tag can be used to mark up a This tag can be used to associate a caption together with some embedded content,such as a graphic or markup for an HTM 5 document would look like the following <!DOCTYPE html > < html > <head> <meta charset="utf-8"> <title>..</title> </head> <body> <header>..</header> <nav>..</nav> <article> <section> .. </section> </article> <aside>.
7 </aside> <figure>..</figure> <footer>..</footer> </body> </ html > <!DOCTYPE html > < html > <head> <meta charset="utf-8"> <title>..</title> </head> <body> <header role="banner"> <h1> HTML5 Document Structure Example</h1> <p>This page should be tried in safari, chrome or Mozila.</p> </header> <nav> <ul> <li> <a href=" "> html Tutorial</a> </li> <li> <a href=" ">CSS Tutorial</a> </li> <li> <a href=" ">JavaScript Tutorial</a> </li> </ul> </nav> <article> <section> <p>Once article can have multiple sections</p> </section> </article> <aside> <p>This is aside part of the web page</p> </aside> <figure align="right"> <img src="/ HTML5 / " alt="TutorialPoint" width="200" height="100"> </figure> <footer> <p>Created by <a href=" ">Tutorials Point</a> </p> </footer> </body> </ html >This will produce following result HTML5 - ATTRIBUTESHTML5 - ATTRIBUTESAs explained in previous chapter.
8 Elements may contain attributes that are used to set variousproperties of an attributes are defined globally and can be used on any element, while others are defined forspecific elements only. All attributes have a name and a value and look like as shown below in is the example of an HTML5 attributes which illustrates how to mark up a div elementwith an attribute named class using a value of "example" <div >..</div>Attributes may only be specified within start tags and must never be used in end attributes are case insensitive and may be written in all uppercase or mixed case, althoughthe most common convention is to stick with AttributesThe attributes listed below are supported by almost all the html 5 DefinedSpecifies a keyboard shortcut to access an , left, centerHorizontally aligns tagsbackgroundURLP laces an background image behind an elementbgcolornumeric,hexidecimal, RGBvaluesPlaces a background color behind an elementclassUser DefinedClassifies an element for use with Cascading , falseSpecifies if the user can edit the element's content idSpecifies the context menu for an DefinedCustom attributes.
9 Authors of a html document candefine their own attributes. Must start with "data-".draggabletrue,false, autoSpecifies whether or not a user is allowed to drag ValueSpecifies the height of tables, images, or table whether element should be visible or DefinedNames an element for use with Cascading Style of elementsUsed to group of itemsUsed to group , falseSpecifies if the element must have it's spelling orgrammar Style sheetSpecifies an inline style for an define idSpecifies the element's corresponding numberSpecifies the tab order of an Defined"Pop-up" title for your , middle,bottomVertically aligns tags within an html ValueSpecifies the width of tables, images, or table a complete list of HTML5 Tags and related attributes please check reference to HTML5 AttributesA new feature being introduced in html 5 is the addition of custom data custom data attribute starts with data- and would be named based on your is the simple example <div >.
10 </div>The above will be perfectly valid HTML5 with two custom attributes called data-subject and data-level. You would be able to get the values of these attributes using JavaScript APIs or CSS in similarway as you get for standard - EVENTSHTML5 - EVENTSWhen a user visit your website, they do things like click on text and images and given links, hoverover things etc. These are examples of what JavaScript calls can write our event handlers in Javascript or vbscript and you can specify these event handlersas a value of event tag attribute. The HTML5 specification defines various event attributes as listedbelow There are following attributes which can be used to trigger any javascript or vbscript code givenas value, when there is any event occurs for any HTM5 would cover element specific events while discussing those elements in detail in when the document goes offlineonabortscriptTriggers on an abort eventonafterprintscriptTriggers after the document is printedonbeforeonloadscriptTriggers before the document loadsonbeforeprintscriptTriggers before the document is printedonblurscriptTriggers when the window loses focusoncanplayscriptTriggers when media can start play, but might has to stop forbufferingoncanplaythroughscriptTrigge rs when media can be played to the end.