SlideShare a Scribd company logo
HTML5 Quick Learning Guide
                          Just what you need to know to quickly
                            move from HTML / XHTML to HTML5




                                           Brought to you by




                                 http://freehtml5templates.com/




Licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License
HTML5 syntax is compatible with both HTML4 and XHTML1. Want to close
empty elements with a slash? Go for it. Rather not? Then don't. Want to use
lower case? Upper case? Take your pick. In other words, you really don't have
to change the way you handle these things, so don't worry, ok?

HTML5 doctype is much simpler:

        New way:
        <!doctype html>

     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">



Meta charset tag is much simpler:

        New way:
        <meta charset="UTF-8">

     Old way:
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-
8" />

Divs are now used for styling rather than structure; HTML5 includes several
new structural elements that help define parts of the document. Let's take a
look at the main new structural elements that you'll probably use right away.

(Note that included in the head is an HTML5 shiv that allows us to style elements in IE,
and a basic CSS style is also included so we can help browsers that aren't caught up yet to
render the new block-level elements as block-level elements. For now, it's easiest just to
automatically include them. Understanding why can come later.)




Licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License
Main Structural Elements You'll Use Most Often in HTML5

<header>

<nav>

<section>

<article>

<aside>

<footer>

Although these sound like “positions” in a document, and very often will be
used in that way, they really are about grouping and not positioning. You might
have 3 <sections> in a page, with each <section> having its own <header> and
<footer> for instance. (Note that these elements – like classes – can be used
more than once on a page).

But to keep things simple, for this document's purpose, let's just think of a
very basic document that contains a top header, a menu for navigation, a
content section that contains a couple of articles, a sidebar, and a footer.

In HTML4 or XHTML, you probably would have used divs, classes and ids to
group each of those areas. You can and should still use divs, classes and ids for
styling reasons, but they may no longer be as necessary as before for
structural purposes. Some documents may be able to get by without them
completely, while most will probably still need them for styling. But again, for
the purposes of learning the quick facts to create a simple HTML5 document,
let's keep this really basic.

Here's a simple way to code a very basic document that contains a top header,
a menu for navigation, a content section that contains a couple of articles, a
sidebar, and a footer in HTML5.




Licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License
<!doctype html>
<html>
<head>
       <meta charset="utf-8">
       <title>Very Basic Document</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="#">Home</a></li>
                         <li><a href="#">About</a></li>
                         <li><a href="#">Products</a></li>
                         <li><a href="#">Contact Us</a></li>
                 </ul>
       </nav>
       <header>
                 <h1><a href="#">Very Basic Document</a></h1>
                 <h2>A tag line might go here</h2>
       </header>
       <section>
                 <article>
                         <h3><a href="#">First Article Title</a></h3>
                         <img src="images/flower.jpg" alt="flower">
                         <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. </p>
                 </article>
                 <article>
                         <h3><a href="#">Second Article Title</a></h3>
                         <img src="images/tree.jpg" alt="tree">
                         <p>Praesent libero. Sed cursus ante dapibus diam.</p>
                 </article>
       </section>
       <aside>
                 <h4>Connect With Us</h4>
                         <ul>
                                  <li><a href="#">Twitter</a></li>
                                  <li><a href="#">Facebook</a></li>
                         </ul>
       </aside>
       <footer>
                 <p>All rights reserved.</p>
       </footer>
</body>
</html>

Licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License
As you can see, the structure is fairly simple, and you can style these new
structural elements in the CSS. However, because you may have some of these
structural elements within different groupings on a page (such as several
sections having different headers and footers), you may want to style each
differently. In that case, you can still assign ids and classes just as you would
in HTML4 or XHTML.

The point of the structural elements is to designate structure after all;
presentation is dealt with in the CSS in whatever manner works best for you,
using ids and classes.

So what are the actual definitions of these new structural elements?

<header> represents a group of introductory or navigational aids. (Things
you'd usually wrap in a H1, H2, Hx, etc)

<nav> represents a section of the document intended for navigation. (Like a
menu)

<section> represents a generic document or application section. It can be
used together with the h1, h2, h3, h4, h5, and h6 elements to indicate the
document structure. (Just a logical grouping such as a content section)

<article> represents an independent piece of content of a document, such as
a blog entry or newspaper article. (Independent is the key word here. If the
piece of content could make sense plucked out of this document and placed
somewhere else, it's probably an article)

<aside> represents a piece of content that is only slightly related to the rest
of the page. (Usually a sidebar, but could be another type of content that
isn't directly related to the main content)

<footer> represents a footer for a section and can contain information about
the author, copyright information, et cetera. (You know, like... a footer)

Of course, HTML5 comes with other interesting elements such as the video and
audio elements, plus new and changed elements and attributes, but all of
those belong in a separate cheat sheet. This one is to get you up and running
fast, so there you have it. Just the basics that will let you quickly move from
HTML4 or XHTML to HTML5 right now!

Licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License
If you want to delve into the finer points, I recommend starting with the W3C
draft, entitled HTML5 differences from HTML4 located at
http://dev.w3.org/html5/html4-differences/




This document created by http://freehtml5templates.com/

We'd love to have you follow us at http://twitter.com/html5templates and
please bookmark and share our site within your social networks (twitter,
facebook, stumbleupon, delicious, etc).


        Feel free to share this document with others, keeping in mind that
        this document is licensed under the Creative Commons
        Attribution-Noncommercial-No Derivative Works 3.0 United
        States License (http://creativecommons.org/licenses/by-nc-
        nd/3.0/us/).

        Share it; don't sell it. Share it; don't change it.

        Pretty simple, yes? :)




Licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License

More Related Content

What's hot

Html5 and-css3-overview
Html5 and-css3-overviewHtml5 and-css3-overview
Html5 and-css3-overview
Jacob Nelson
 
Introduction to HTML5 and CSS3 (revised)
Introduction to HTML5 and CSS3 (revised)Introduction to HTML5 and CSS3 (revised)
Introduction to HTML5 and CSS3 (revised)Joseph Lewis
 
Html beginner
Html beginnerHtml beginner
Html beginnerwihrbt
 
HTML5
HTML5 HTML5
HTML 5 Complete Reference
HTML 5 Complete ReferenceHTML 5 Complete Reference
HTML 5 Complete Reference
EPAM Systems
 
Intro to HTML and CSS - Class 2 Slides
Intro to HTML and CSS - Class 2 SlidesIntro to HTML and CSS - Class 2 Slides
Intro to HTML and CSS - Class 2 SlidesHeather Rock
 
HTML CSS Best Practices
HTML CSS Best PracticesHTML CSS Best Practices
HTML CSS Best Practiceshoctudau
 
Artistic Web Applications - Week3 - Part 3
Artistic Web Applications - Week3 - Part 3Artistic Web Applications - Week3 - Part 3
Artistic Web Applications - Week3 - Part 3
Katherine McCurdy-Lapierre, R.G.D.
 
Week 6 Lecture
Week 6 LectureWeek 6 Lecture
Html basics-auro skills
Html basics-auro skillsHtml basics-auro skills
Html basics-auro skills
BoneyGawande
 
Wiki to HTML Conversion
Wiki to HTML ConversionWiki to HTML Conversion
Wiki to HTML Conversion
Dave Derrick
 
Basic Html for beginners.
Basic Html for beginners.Basic Html for beginners.
Basic Html for beginners.
Muhammad Shafique
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
Amit Tyagi
 

What's hot (16)

Html5 and-css3-overview
Html5 and-css3-overviewHtml5 and-css3-overview
Html5 and-css3-overview
 
Introduction to HTML5 and CSS3 (revised)
Introduction to HTML5 and CSS3 (revised)Introduction to HTML5 and CSS3 (revised)
Introduction to HTML5 and CSS3 (revised)
 
xhtml_basics
xhtml_basicsxhtml_basics
xhtml_basics
 
Html beginner
Html beginnerHtml beginner
Html beginner
 
HTML5
HTML5 HTML5
HTML5
 
HTML 5 Complete Reference
HTML 5 Complete ReferenceHTML 5 Complete Reference
HTML 5 Complete Reference
 
Intro to HTML and CSS - Class 2 Slides
Intro to HTML and CSS - Class 2 SlidesIntro to HTML and CSS - Class 2 Slides
Intro to HTML and CSS - Class 2 Slides
 
HTML CSS Best Practices
HTML CSS Best PracticesHTML CSS Best Practices
HTML CSS Best Practices
 
Artistic Web Applications - Week3 - Part 3
Artistic Web Applications - Week3 - Part 3Artistic Web Applications - Week3 - Part 3
Artistic Web Applications - Week3 - Part 3
 
Week 6 Lecture
Week 6 LectureWeek 6 Lecture
Week 6 Lecture
 
Html basics-auro skills
Html basics-auro skillsHtml basics-auro skills
Html basics-auro skills
 
Wiki to HTML Conversion
Wiki to HTML ConversionWiki to HTML Conversion
Wiki to HTML Conversion
 
Basic Html for beginners.
Basic Html for beginners.Basic Html for beginners.
Basic Html for beginners.
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
Html5
Html5Html5
Html5
 
Week 4 Lecture Part 2
Week 4 Lecture Part 2Week 4 Lecture Part 2
Week 4 Lecture Part 2
 

Viewers also liked

Html5游戏开发实例分享
Html5游戏开发实例分享Html5游戏开发实例分享
Html5游戏开发实例分享PL dream
 
Html5研究小组《微周刊》第14期
Html5研究小组《微周刊》第14期Html5研究小组《微周刊》第14期
Html5研究小组《微周刊》第14期PL dream
 
Html5 games
Html5 gamesHtml5 games
Html5 games
PL dream
 
善用网络@Our Dear Amy
善用网络@Our Dear Amy善用网络@Our Dear Amy
善用网络@Our Dear Amy
OurDearAmy
 
Php internal-release 2011-04-01-v0.5.2
Php internal-release 2011-04-01-v0.5.2Php internal-release 2011-04-01-v0.5.2
Php internal-release 2011-04-01-v0.5.2
PL dream
 
Beyond Question Stems: Critical Thinking in the 21st Century Classroom
Beyond Question Stems: Critical Thinking in the 21st Century ClassroomBeyond Question Stems: Critical Thinking in the 21st Century Classroom
Beyond Question Stems: Critical Thinking in the 21st Century Classroom
Jennifer Jones
 
6 Thinking Hats
6 Thinking Hats6 Thinking Hats
6 Thinking Hatsnathanr07
 
Creative Thinking & Problem Solving
Creative Thinking & Problem SolvingCreative Thinking & Problem Solving
Creative Thinking & Problem Solving
Asma Karoobi
 

Viewers also liked (8)

Html5游戏开发实例分享
Html5游戏开发实例分享Html5游戏开发实例分享
Html5游戏开发实例分享
 
Html5研究小组《微周刊》第14期
Html5研究小组《微周刊》第14期Html5研究小组《微周刊》第14期
Html5研究小组《微周刊》第14期
 
Html5 games
Html5 gamesHtml5 games
Html5 games
 
善用网络@Our Dear Amy
善用网络@Our Dear Amy善用网络@Our Dear Amy
善用网络@Our Dear Amy
 
Php internal-release 2011-04-01-v0.5.2
Php internal-release 2011-04-01-v0.5.2Php internal-release 2011-04-01-v0.5.2
Php internal-release 2011-04-01-v0.5.2
 
Beyond Question Stems: Critical Thinking in the 21st Century Classroom
Beyond Question Stems: Critical Thinking in the 21st Century ClassroomBeyond Question Stems: Critical Thinking in the 21st Century Classroom
Beyond Question Stems: Critical Thinking in the 21st Century Classroom
 
6 Thinking Hats
6 Thinking Hats6 Thinking Hats
6 Thinking Hats
 
Creative Thinking & Problem Solving
Creative Thinking & Problem SolvingCreative Thinking & Problem Solving
Creative Thinking & Problem Solving
 

Similar to Html5 quick-learning-quide

Html
HtmlHtml
Grade 10 COMPUTER
Grade 10 COMPUTERGrade 10 COMPUTER
Grade 10 COMPUTER
Joel Linquico
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5Terry Ryan
 
Beginning Html 5 Presentation
Beginning Html 5 PresentationBeginning Html 5 Presentation
Beginning Html 5 Presentation
Usman Saleem
 
Semantic HTML5
Semantic HTML5Semantic HTML5
Semantic HTML5
Terry Ryan
 
Html5
Html5Html5
Sitepoint.com a basic-html5_template
Sitepoint.com a basic-html5_templateSitepoint.com a basic-html5_template
Sitepoint.com a basic-html5_templateDaniel Downs
 
Html5 semantics
Html5 semanticsHtml5 semantics
Html5 semantics
Prashanth Krish
 
What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)
Ahsan Rahim
 
Fronttechnieken met HTML5 en de Slice-template
Fronttechnieken met HTML5 en de Slice-templateFronttechnieken met HTML5 en de Slice-template
Fronttechnieken met HTML5 en de Slice-templateInventis Web Architects
 
HTML Coding #01 : Don't Fear the Code
HTML Coding #01 : Don't Fear the CodeHTML Coding #01 : Don't Fear the Code
HTML Coding #01 : Don't Fear the Code
Michael Sturgeon
 
Html 5, a gentle introduction
Html 5, a gentle introductionHtml 5, a gentle introduction
Html 5, a gentle introduction
Diego Scataglini
 
Html Workshop
Html WorkshopHtml Workshop
Html Workshop
vardanyan99
 
Html5 semantics
Html5 semanticsHtml5 semantics
Html5 semantics
Webtech Learning
 
Html5 css3
Html5 css3Html5 css3
Html5 css3
Altaf Pinjari
 
Html5
Html5Html5
Introduction to HTML.pptx
Introduction to HTML.pptxIntroduction to HTML.pptx
Introduction to HTML.pptx
malrad1
 
Three quick accessibility tips for HTML5
Three quick accessibility tips for HTML5Three quick accessibility tips for HTML5
Three quick accessibility tips for HTML5
Russ Weakley
 
Html5, a gentle introduction
Html5, a gentle introduction Html5, a gentle introduction
Html5, a gentle introduction
Diego Scataglini
 

Similar to Html5 quick-learning-quide (20)

Html
HtmlHtml
Html
 
Grade 10 COMPUTER
Grade 10 COMPUTERGrade 10 COMPUTER
Grade 10 COMPUTER
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
Beginning Html 5 Presentation
Beginning Html 5 PresentationBeginning Html 5 Presentation
Beginning Html 5 Presentation
 
Semantic HTML5
Semantic HTML5Semantic HTML5
Semantic HTML5
 
Html5
Html5Html5
Html5
 
Sitepoint.com a basic-html5_template
Sitepoint.com a basic-html5_templateSitepoint.com a basic-html5_template
Sitepoint.com a basic-html5_template
 
Html5 semantics
Html5 semanticsHtml5 semantics
Html5 semantics
 
What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)
 
Week 2-intro-html
Week 2-intro-htmlWeek 2-intro-html
Week 2-intro-html
 
Fronttechnieken met HTML5 en de Slice-template
Fronttechnieken met HTML5 en de Slice-templateFronttechnieken met HTML5 en de Slice-template
Fronttechnieken met HTML5 en de Slice-template
 
HTML Coding #01 : Don't Fear the Code
HTML Coding #01 : Don't Fear the CodeHTML Coding #01 : Don't Fear the Code
HTML Coding #01 : Don't Fear the Code
 
Html 5, a gentle introduction
Html 5, a gentle introductionHtml 5, a gentle introduction
Html 5, a gentle introduction
 
Html Workshop
Html WorkshopHtml Workshop
Html Workshop
 
Html5 semantics
Html5 semanticsHtml5 semantics
Html5 semantics
 
Html5 css3
Html5 css3Html5 css3
Html5 css3
 
Html5
Html5Html5
Html5
 
Introduction to HTML.pptx
Introduction to HTML.pptxIntroduction to HTML.pptx
Introduction to HTML.pptx
 
Three quick accessibility tips for HTML5
Three quick accessibility tips for HTML5Three quick accessibility tips for HTML5
Three quick accessibility tips for HTML5
 
Html5, a gentle introduction
Html5, a gentle introduction Html5, a gentle introduction
Html5, a gentle introduction
 

Recently uploaded

From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 

Recently uploaded (20)

From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 

Html5 quick-learning-quide

  • 1. HTML5 Quick Learning Guide Just what you need to know to quickly move from HTML / XHTML to HTML5 Brought to you by http://freehtml5templates.com/ Licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License
  • 2. HTML5 syntax is compatible with both HTML4 and XHTML1. Want to close empty elements with a slash? Go for it. Rather not? Then don't. Want to use lower case? Upper case? Take your pick. In other words, you really don't have to change the way you handle these things, so don't worry, ok? HTML5 doctype is much simpler: New way: <!doctype html> 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"> Meta charset tag is much simpler: New way: <meta charset="UTF-8"> Old way: <meta http-equiv="Content-Type" content="text/html; charset=UTF- 8" /> Divs are now used for styling rather than structure; HTML5 includes several new structural elements that help define parts of the document. Let's take a look at the main new structural elements that you'll probably use right away. (Note that included in the head is an HTML5 shiv that allows us to style elements in IE, and a basic CSS style is also included so we can help browsers that aren't caught up yet to render the new block-level elements as block-level elements. For now, it's easiest just to automatically include them. Understanding why can come later.) Licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License
  • 3. Main Structural Elements You'll Use Most Often in HTML5 <header> <nav> <section> <article> <aside> <footer> Although these sound like “positions” in a document, and very often will be used in that way, they really are about grouping and not positioning. You might have 3 <sections> in a page, with each <section> having its own <header> and <footer> for instance. (Note that these elements – like classes – can be used more than once on a page). But to keep things simple, for this document's purpose, let's just think of a very basic document that contains a top header, a menu for navigation, a content section that contains a couple of articles, a sidebar, and a footer. In HTML4 or XHTML, you probably would have used divs, classes and ids to group each of those areas. You can and should still use divs, classes and ids for styling reasons, but they may no longer be as necessary as before for structural purposes. Some documents may be able to get by without them completely, while most will probably still need them for styling. But again, for the purposes of learning the quick facts to create a simple HTML5 document, let's keep this really basic. Here's a simple way to code a very basic document that contains a top header, a menu for navigation, a content section that contains a couple of articles, a sidebar, and a footer in HTML5. Licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License
  • 4. <!doctype html> <html> <head> <meta charset="utf-8"> <title>Very Basic Document</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="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Products</a></li> <li><a href="#">Contact Us</a></li> </ul> </nav> <header> <h1><a href="#">Very Basic Document</a></h1> <h2>A tag line might go here</h2> </header> <section> <article> <h3><a href="#">First Article Title</a></h3> <img src="images/flower.jpg" alt="flower"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. </p> </article> <article> <h3><a href="#">Second Article Title</a></h3> <img src="images/tree.jpg" alt="tree"> <p>Praesent libero. Sed cursus ante dapibus diam.</p> </article> </section> <aside> <h4>Connect With Us</h4> <ul> <li><a href="#">Twitter</a></li> <li><a href="#">Facebook</a></li> </ul> </aside> <footer> <p>All rights reserved.</p> </footer> </body> </html> Licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License
  • 5. As you can see, the structure is fairly simple, and you can style these new structural elements in the CSS. However, because you may have some of these structural elements within different groupings on a page (such as several sections having different headers and footers), you may want to style each differently. In that case, you can still assign ids and classes just as you would in HTML4 or XHTML. The point of the structural elements is to designate structure after all; presentation is dealt with in the CSS in whatever manner works best for you, using ids and classes. So what are the actual definitions of these new structural elements? <header> represents a group of introductory or navigational aids. (Things you'd usually wrap in a H1, H2, Hx, etc) <nav> represents a section of the document intended for navigation. (Like a menu) <section> represents a generic document or application section. It can be used together with the h1, h2, h3, h4, h5, and h6 elements to indicate the document structure. (Just a logical grouping such as a content section) <article> represents an independent piece of content of a document, such as a blog entry or newspaper article. (Independent is the key word here. If the piece of content could make sense plucked out of this document and placed somewhere else, it's probably an article) <aside> represents a piece of content that is only slightly related to the rest of the page. (Usually a sidebar, but could be another type of content that isn't directly related to the main content) <footer> represents a footer for a section and can contain information about the author, copyright information, et cetera. (You know, like... a footer) Of course, HTML5 comes with other interesting elements such as the video and audio elements, plus new and changed elements and attributes, but all of those belong in a separate cheat sheet. This one is to get you up and running fast, so there you have it. Just the basics that will let you quickly move from HTML4 or XHTML to HTML5 right now! Licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License
  • 6. If you want to delve into the finer points, I recommend starting with the W3C draft, entitled HTML5 differences from HTML4 located at http://dev.w3.org/html5/html4-differences/ This document created by http://freehtml5templates.com/ We'd love to have you follow us at http://twitter.com/html5templates and please bookmark and share our site within your social networks (twitter, facebook, stumbleupon, delicious, etc). Feel free to share this document with others, keeping in mind that this document is licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License (http://creativecommons.org/licenses/by-nc- nd/3.0/us/). Share it; don't sell it. Share it; don't change it. Pretty simple, yes? :) Licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License