HTML5: Your visual blueprint for designing rich Web pages and applications
()
About this ebook
HTML5 is the latest iteration of the standard markup languagefor creating Web pages. It boasts extensive updates from itspredecessor and allows you to incorporate rich media content into asite without any dependence on extra software such as Flash. Packedwith hundreds of screen shots, this visual guide introduces you tothe many new features and abilities of HTML5 and shows you the manyexciting new possibilities that exist for designing dynamic Webpages.
- Offers visual learners a solid reference on HTML5, the latestversion of the standard markup language for designing Webpages
- Demonstrates how to use HTML5 to create Web pages that featurethe latest in rich media content
- Provides easy-to-understand examples that cover a variety oftopics to get you up and running with HTML5
- Features a companion Web site that contains all the codeneeded to learn HTML5
- HTML5: Your visual blueprint for designing effective Web pagesopens your eyes to the world of possibilities that exist with thenew version of the popular markup language.
Adam R. McDaniel is a Web developer, technicalarchitect, and security analyst, who has contributed to the LinuxKernel.
Related to HTML5
Titles in the series (6)
iPhone OS Development: Your visual blueprint for developing apps for Apple's mobile devices Rating: 3 out of 5 stars3/5HTML: Your visual blueprint for designing Web pages with HTML, CSS, and XHTML Rating: 4 out of 5 stars4/5Excel Programming: Your visual blueprint for creating interactive spreadsheets Rating: 4 out of 5 stars4/5Android Development with Flash: Your Visual Blueprint for Developing Mobile Apps Rating: 0 out of 5 stars0 ratingsPerl and Apache: Your visual blueprint for developing dynamic Web content Rating: 0 out of 5 stars0 ratings
Related ebooks
jQuery For Dummies Rating: 4 out of 5 stars4/5HTML5 & CSS3 For Dummies Rating: 5 out of 5 stars5/5JavaScript All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsBeginning HTML5 and CSS3 For Dummies Rating: 0 out of 5 stars0 ratingsWeb Coding & Development All-in-One For Dummies Rating: 1 out of 5 stars1/5HTML, CSS, and JavaScript Mobile Development For Dummies Rating: 4 out of 5 stars4/5JavaFX For Dummies Rating: 0 out of 5 stars0 ratingsTeach Yourself VISUALLY Adobe Dreamweaver CS6 Rating: 4 out of 5 stars4/5Teach Yourself VISUALLY Web Design Rating: 4 out of 5 stars4/5HTML5 and CSS3 All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsHTML, CSS, & JavaScript All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsCoding with JavaScript For Dummies Rating: 0 out of 5 stars0 ratingsiOS Cloud Development For Dummies Rating: 5 out of 5 stars5/5iPhone OS Development: Your visual blueprint for developing apps for Apple's mobile devices Rating: 3 out of 5 stars3/5Adobe Illustrator CC For Dummies Rating: 5 out of 5 stars5/5Teach Yourself Visually WordPress Rating: 0 out of 5 stars0 ratingsCoding All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsPHP, MySQL, & JavaScript All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsWordPress Web Design For Dummies Rating: 3 out of 5 stars3/5SwiftUI For Dummies Rating: 0 out of 5 stars0 ratingsiOS App Development Portable Genius Rating: 0 out of 5 stars0 ratingsAWS For Developers For Dummies Rating: 0 out of 5 stars0 ratingsCSS3 Foundations Rating: 4 out of 5 stars4/5Mastering Microsoft Visual Basic 2010 Rating: 0 out of 5 stars0 ratingsDigital Literacy For Dummies Rating: 3 out of 5 stars3/5HTML, XHTML and CSS For Dummies Rating: 4 out of 5 stars4/5Android Development with Flash: Your Visual Blueprint for Developing Mobile Apps Rating: 0 out of 5 stars0 ratingsPhotoshop Elements 2023 For Dummies Rating: 0 out of 5 stars0 ratingsHTML5 Games: Creating Fun with HTML5, CSS3, and WebGL Rating: 4 out of 5 stars4/5Swift For Dummies Rating: 0 out of 5 stars0 ratings
Programming For You
C# 7.0 All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsPython: Learn Python in 24 Hours Rating: 4 out of 5 stars4/5SQL: For Beginners: Your Guide To Easily Learn SQL Programming in 7 Days Rating: 5 out of 5 stars5/5Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5Python Programming : How to Code Python Fast In Just 24 Hours With 7 Simple Steps Rating: 4 out of 5 stars4/5Python: For Beginners A Crash Course Guide To Learn Python in 1 Week Rating: 4 out of 5 stars4/5Python QuickStart Guide: The Simplified Beginner's Guide to Python Programming Using Hands-On Projects and Real-World Applications Rating: 0 out of 5 stars0 ratingsGrokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5Java for Beginners: A Crash Course to Learn Java Programming in 1 Week Rating: 5 out of 5 stars5/5Excel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5C All-in-One Desk Reference For Dummies Rating: 5 out of 5 stars5/5SQL All-in-One For Dummies Rating: 3 out of 5 stars3/5Learn PowerShell in a Month of Lunches, Fourth Edition: Covers Windows, Linux, and macOS Rating: 0 out of 5 stars0 ratingsSQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5Assembly Programming:Simple, Short, And Straightforward Way Of Learning Assembly Language Rating: 5 out of 5 stars5/5Python for Beginners: Learn the Fundamentals of Computer Programming Rating: 0 out of 5 stars0 ratingsHTML & CSS: Learn the Fundaments in 7 Days Rating: 4 out of 5 stars4/5Learn to Code. Get a Job. The Ultimate Guide to Learning and Getting Hired as a Developer. Rating: 5 out of 5 stars5/5TensorFlow in 1 Day: Make your own Neural Network Rating: 4 out of 5 stars4/5PYTHON: Practical Python Programming For Beginners & Experts With Hands-on Project Rating: 5 out of 5 stars5/5Narrative Design for Indies: Getting Started Rating: 4 out of 5 stars4/5C++ Learn in 24 Hours Rating: 0 out of 5 stars0 ratingsRaspberry Pi Cookbook for Python Programmers Rating: 0 out of 5 stars0 ratings
Reviews for HTML5
0 ratings0 reviews
Book preview
HTML5 - Adam McDaniel
Chapter 2: Getting Started with HTML5 Page Layout
Create an HTML5 Web Page
A web page identified as an HTML5 web page means different things to different web browsers, depending on whether the browser itself supports HTML5, along with which specific features. Chapter 1, Introducing HTML5,
discusses how to identify which features an HTML5 browser supports; you can use this information later in building your web page, but first, you must identify that your page is designed for HTML5.
Every HTML5 web page requires a special doctype element as the first element on the page. The whole line becomes a doctype declaration, or DTD. If you are familiar with HTML 4.01, the DTD was a long, cumbersome string that described which version of HTML or XHTML the page supported. For example, the following describes a web page designed for the HTML 4.01 Transitional standard:
-//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd
>
In HTML5, the DTD tag has been simplified immensely:
The doctype element is required for legacy reasons. It ensures that the browser runs in standards mode, which basically ensures that it follows the latest HTML specification that it is coded for, as closely as possible.
So, when an HTML5 browser sees this, it knows that the page supports the new HTML5 standard, which is the latest version that it understands. When an HTML 4.01 browser sees this, it knows to follow HTML 4.01 Transitional standard, as this is what it falls back to when the doctype legacy string, the latter part of the DTD plus the URL, is missing.
Following the DTD, other HTML container tags that you are already familiar with from HTML 4.01 and earlier, such as , ,
Create an HTML5 Web Page
9780470952221-fg0201.eps001 Open a text editor.
002 Type .
003 Type .
004 Type .
Note: The html element must be begin on the second line and end on the last line of your web page.
9780470952221-fg0202.eps005 Type .
006 Type .
007 Type .
008 Type .
Note: The head and body tag groups must follow one another. All unique page content appears within one or the other.
9780470952221-fg0203.eps009 Type
010 Insert some content within the body tag group.
011 Save the HTML5 web page as pagename.html.
9780470952221-fg0204.eps012 Open the pagename.html file in an HTML5 web browser.
A The title appears.
B The body content appears.
Note: Because this HTML5 example follows HTML 4.01 standard, this particular page will render correctly in a pre-HTML5 browser as well.
Apply It
Note that in HTML5 and HTML 4.01, the doctype element and attributes are not case sensitive. So you can use , and it will still be considered valid.
The doctype element is also used by third-party validator services to check for compliance against the various HTML standards, as described in Chapter 1. There is one caveat, though: An HTML 4.01 browser will not understand HTML5 tags, but your doctype element will say that it supports the latest HTML specification, according to this older browser. So how do you test an HTML5 web page for compliance against earlier standards, such as HTML 4.01 Transitional?
TRY THIS
Go to the W3C Markup Validation Service, at http://validator.w3.org, type in an HTML5 website URL, and click More Options.
Select a non-HTML5 Document Type option, such as HTML 4.01 Transitional, and run the test.
ApplyItArrowRESULT
The number of errors and warnings will increase, compared to the same test run with an HTML5 Document Type option. This indicates the HTML5-specific code that is not perfectly HTML 4.01 compliant.
As you start to implement the HTML5 features described in this book, this test can produce more and more supposed failures. Fortunately, fallback procedures inherent with HTML5 tag structure will prevail, allowing the page to render correctly, and these errors become