week02 doctype html5 - faculty.chemeketa.edufaculty.chemeketa.edu/.../week02_doctype_html5.pdf ·...
Post on 26-Mar-2018
225 Views
Preview:
TRANSCRIPT
VC 238 :: Week 02 1 of 5 02 October 2017
— Lecture Outline —
week::two DOCTYPEs, Rendering Engines, & HTML5
A Quick History of Browsers
Designing with Web Standards
Structure o HTML, HTML5
Presentation o CSS, CSS3
Behavior o ECMAScript (JavaScript; jQuery) o DOM (Document Object Model)
DOCTYPE
Defined o A method of instructing a Web browser which layout mode to use when displaying a page.
Modes o Quirks Mode
§ In the Quirks mode, browsers violate contemporary Web format specifications in order to avoid “breaking” pages authored according to practices that were prevalent in the late 1990s.
o Standards Mode § In the Standards mode, browsers try to give conforming documents the specification-wise correct
treatment to the extent implemented in a particular browser. HTML5 calls this mode the “no quirks mode.”
o Almost Standards Mode § Firefox, Safari, Chrome, Opera (since 7.5) and IE8 also have a mode known as “Almost Standards
mode,” that implements the vertical sizing of table cells traditionally and not rigorously according to the CSS2 specification. HTML5 calls this mode the “limited quirks mode.”
Examples o XHTML 1.0 Transitional
§ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
o XHTML 1.0 Strict § <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
o HTML5 § <!DOCTYPE html>
Sources o http://diveintohtml5.info/semantics.html o http://hsivonen.iki.fi/doctype/
VC 238 :: Week 02 2 of 5 02 October 2017
— Lecture Outline —
Rendering Engines
One Web; Many Different Ways to View It:
Engine Browser Supported Platforms
Gecko
Firefox Mac OS X, Windows, UNIX/Linux, Android etc.
WebKit
Apple Safari Mac OS X, Windows, iOS devices
Chrome Forked WebKit and moving to Blink
Mac OS X, Windows, UNIX/Linux
Most mobile devices iOS, Android, Amazon devices
Blink
Google Chrome Mac OS X, Windows, UNIX/Linux
Trident
Internet Explorer Windows
EdgeHTML
Microsoft Edge Windows 10 only
Presto Moved to WebKit 2/13 Moved to Blink mid-2013
Opera Mac OS X, Windows, UNIX/Linux
Vender Prefixes o A necessary evil. o Allow the web to move forward without breaking it. o Will re-visit when we discuss CSS3. o Common prefixes:
-ms- Microsoft
-moz- Mozilla Foundation (Gecko browsers)
-o- Opera Software
-webkit- Safari (and WebKit browsers)
Code Validation
Validate your code to a specific DOCTYPE o http://validator.w3.org
o Validates HTML, CSS, and other languages. o Great way to learn proper coding techniques. o However, don’t get hung up on validation—it’s nice but not critical.
VC 238 :: Week 02 3 of 5 02 October 2017
— Lecture Outline —
HTML5
History
What It Brings o Error Handling (for browser makers) o Simple DOCTYPE o Loose syntax requirements (boo!) o No Frames o Some obsolete/deprecated tags o New JavaScript APIs
Other Features (mainly for programmers) o The Canvas o SVG o New audio and video tags o Form improvements
§ Datalist, Search field, Sliders, Calendar
o Geolocation o Local storage o Offline web app support
Resources
Dive Into HTML5
http://diveintohtml5.info
HTML5 for Web Designers
http://www.abookapart.com
VC 238 :: Week 02 4 of 5 02 October 2017
— Lecture Outline —
Semantic Tags in HTML5
<section>
The section element represents a generic document or application section. A section, in this context, is a thematic grouping of content, typically with a heading. Examples of sections would be chapters, the tabbed pages in a tabbed dialog box, or the numbered sections of a thesis. A Web site's home page could be split into sections for an introduction, news items, contact information.
<header>
The header element represents a group of introductory or navigational aids. A header element is intended to usually contain the section’s heading (an h1–h6 element or an hgroup element), but this is not required. The header element can also be used to wrap a section’s table of contents, a search form, or any relevant logos.
<hgroup> The hgroup element represents the heading of a section. The element is used to group a set of h1–h6 elements when the heading has multiple levels, such as subheadings, alternative titles, or taglines.
<footer>
The footer element represents a footer for its nearest ancestor sectioning content or sectioning root element. A footer typically contains information about its section such as who wrote it, links to related documents, copyright data, and the like. Footers don’t necessarily have to appear at the end of a section, though they usually do. When the footer element contains entire sections, they represent appendices, indexes, long colophons, verbose license agreements, and other such content.
<aside>
The aside element represents a section of a page that consists of content that is tangentially related to the content around the aside element, and which could be considered separate from that content. Such sections are often represented as sidebars in printed typography. The element can be used for typographical effects like pull quotes or sidebars, for advertising, for groups of nav elements, and for other content that is considered separate from the main content of the page.
<nav>
The nav element represents a section of a page that links to other pages or to parts within the page: a section with navigation links. Not all groups of links on a page need to be in a nav element — only sections that consist of major navigation blocks are appropriate for the nav element. In particular, it is common for footers to have a short list of links to common pages of a site, such as the terms of service, the home page, and a copyright page. The footer element alone is sufficient for such cases, without a nav element.
<article>
The article element represents a component of a page that consists of a self-contained composition in a document, page, application, or site and that is intended to be independently distributable or reusable, e.g. in syndication. This could be a forum post, a magazine or newspaper article, a Web log entry, a user-submitted comment, an interactive widget or gadget, or any other independent item of content.
<main> Represents the main content of the <body> of a document. The content of a <main> element should be unique to the document. Note: Only one <main> element should be used in an HTML page.
o Source: http://diveintohtml5.info/semantics.html
top related