90 likes | 265 Views
HTML 5. Chris Morgan NTPCUG January 2013. What’s New in HTML. Semantic tabs – header, footer, nav , section, atticle , aside, figure, figcaption , details, hgroup Audio/Video – audio, video, source, tract, Canvas/SVG Form input types – date, time, datetime , email number, tel , url
E N D
HTML 5 Chris Morgan NTPCUG January 2013
What’s New in HTML • Semantic tabs – header, footer, nav, section, atticle, aside, figure, figcaption, details, hgroup • Audio/Video – audio, video, source, tract, • Canvas/SVG • Form input types – date, time, datetime, email number, tel, url • Form input attributes – autocomplete, autofocus, list, placeholder, required, pattern (regex), min, max, multiple
What’s Been Removed • Frames • Frame, frameset • Other tags – acronym, applet, basefont, big, center, dir, font, strike, tt
Other New Things • Web Storage • WIA-ARIA – Web Accessibility Initiative – Accessible Rich Internet Applications • Web Workers • App Cache • Drag/Drop • Geolocation • SSE – server sent events • Where does CSS3 fit in
HTML 5 Basics • <!DOCTYPE html> • <html>,<head>,<body> • Structure of a web page • Filenames – default.html, index.html • Use lower case • Use dashes vs underscores • Use .html vs .htm • Spaces, tabs, & CR/LFs in the text – ignored • UTF-8 vs ASCII (universal character set transformation format) • Comments - <!-- … -->
Semantic Tags • Article – a self-contained composition that is independently distributable or usable, like a forum post, magazine article, blog entry, user comment, music review, product description, etc. It can include a heading, paragraphs, images, and subheaders. • Can have several on one page • Can be subdivided into “sections” • Although, a section can contain articles • Can have a “role” attribute, like role=“main”
Semantic Tags, cont. • Section – A generic section of a document, like a book chapter, thematic grouping of information (like an introduction, news items, and contact info.) • Articles & sections are similar, and one can contain the other. You can also have one without the other. • Aside – Content that is tangentially related to the page’s main content, like a sidebar. • Can be inside an article or section or separate.
Semantic Tags, cont. • Header/Footer – Can be the header or footer for a page or an article on the page • Don’t nest headers within footers and vice versa • <div> - Still useful for wrapping content for styling/presentation purposes, like columns. It is a generic container. • Nav – Contains the major navigation liks on a page, often using <ul> … </ul>
Other Tags & Attributes • Id & class attibutes • Address – used to contain contact info. • Mark – for highlighing text, like with a yellow highlighter • Sub, sup – Subscript & superscript • Code, pre – Maintains spaces and CR/LFs, uses mono-spacing • Wbr – conditional line breaking • Title attribute – used for tool tips