#2: Greetings. At the last barcamp I spoke briefly about HTML5. Its been a year - so I thought Id do a follow up to see how things have progressed. As an added bonus Ill have Matt here to talk about some CSS3 awesomeness. Last time I introduced you to some new elements, some JavaScript API stuff and touched on video and audio. This time Im going show you that you can use those new features without fear of destroying your users experience. A practical guide, if you will. Right - so lets just jump back a few years and talk about what most of you are using right now - HTML4 and XHTML.
#3: Youre all familiar with this. I spent many an angered hour trying to convince people this is the way to go! Things have started to change. Huge advances in mobile technology has meant that were having to surf the web like its 1999 again. High speed internet hasnt made it into our pockets. The number of bytes and server calls are actually a concern again - who wants to pwn your vodafone data plans downloading characters and bytes...
#4: Thats why this makes much more sense. Its doing exactly the same thing as the previous example but is so much slimmer. One of the core principles of HTML5: Making your life - as coders - far easier! Pave the cowpaths. If developers have been doing it that way for years dont shun it - roll it into the spec. Billions of webpages on the internet and only very few are well formed. So HTML5 has rolled that into the spec. - which means youre free to write HTML5 however you please. uppercase, lowercase, slashes, no slashes...Im a stickler for well formed code - so I like slashes and everything lowercase.
#5: For me HTML5 is more about semantics, usability and accessibility than syntax. The smart HTML5 people have done some serious research into the way in which we write HTML and noticed hundreds of regularly trodden paths.
#6: embedding audio and video on websites is way more common now thanks to increased bandwidth
#7: Blogs are full of time based articles and sections.
#8: The very layouts we create everyday contain headers, footers, navigation and sidebars.
#9: And this is a high level view of how those semantics might pan out. Ill dive into each of the main structural elements - with reference to what the spec says and show an example. This will be a quick-fire run through cos I dont want to keep you guys from the juicy CSS stuff Matts got lined up.
#11: Represents a generic document or application section. A section is a thematic grouping of content, typically with a header, possibly with a footer. Examples: chapters in a book, various tabbed pages in a tabbed dialog box, a home page could be split into sections for an introduction, news items, contact information.
#12: each section has a header and are self contained.
#14: Forms an independent part of a document, page, or site. A forum post, a magazine or newspaper article, a Web log entry, a user-submitted comment, or any other independent item of content. Think of it as an item that can be syndicated via RSS or ATOM
#17: Typically used to group a set of h1h6 elements to mark up a pages title with its subtitle or tagline. May contain more than just the sections headings and subheadings e.g., version history information or publication date.
#20: Typically contains metadata about its enclosing section, such as who wrote it, links to related documents, copyright data, etc.
#23: Content that is tangentially related to the content around the aside element - considered separate from that content. Such sections are often represented as sidebars in printed typography.
#26: The nav element is a section containing links to other documents or to parts within the current document.Not all groups of links on a page need to be in a nav element only primary navigation links. In particular, it is common for footers to have a list of links to various key parts of a site - you wont need the nav element - the footer element will suffice.
#29: The way to embed audio into a page without having to use a plugin.
#30: This is the most cross browser technique ogg/mp3/other
#33: There are some other elements that are interesting but Im running out of time - so heres some homework. Research these elements.
#35: so far only webkit browsers and opera will support those types. But thats OK, because other browsers will just default to type=text. So USE these fields.
#37: only supported by opera, sadly, but quite useful
#41: Modernizr is a script you add to your site which enables you to use these new HTML5 features as well as a host of the new CSS3 stuff.
#42: first thing it does is makes everything play nice in IE6,7,8 but creating all the new HTML5 elements.
#43: based on your browser (this example is firefox 3.6) modernizr adds an array of classes to the HTML element which enables you to hook in via CSS
#45: it also creates a moderniz javascript object which you can test against. This example is checking to see if your browser supports the new input type of date. If it doesnt you can then provide a suitable fallback.