HTML5
HTML evolved a lot since last time I learned it. So this is a time to review what has changed since then.
What is new, what was removed in HTML5?
- HTML4 to HTML5 migration - a great comparison and article about HTML5.
- HTML Canvas Tutorial
- SVG tutorial
Deprecated.
In older HTML versions, several tags and attributes were used to style documents. These tags and attributes are not supported in HTML5!
Deprecated tags are
Charset
There are differences with charset declaration.
For HTML4
For HTML5
New
What is new at w3schools.
Website Layout
HTML5 offers new semantic elements to support website layout. More details on w3schools.com.
Yes, the layout is rather broad subject but this is about HTML5. It is enough to say it has introduced following tags to clarify and support page layout. The following tags are now available:
header | description |
---|---|
nav | container for navigation links |
section | section in a document |
article | an idependent self-contained article |
aside | content aside from the content (a sidebar) |
footer | for the document or section |
details | additional details |
summary | heading for details element |
Flex and Grid Layouts
- Flex Box Layout
- Grid Layout
Tables enhancement
I am not sure if it is HTML5 which introduced tags
like
<mark> for marking
Results:
Not marked. Marked. Not marked.
<abbr> for abbreviation
Results:
The WHO was founded in 1948.
Forms
I was also not aware of
There are other tags, HTML5 specific, like datalist, keygen, output.
The tag
HTML5 added several new input types:
- color
- date
- datetime
- datetime-local
- month
- number
- range
- search
- tel
- time
- url
- week
There are also new input restrictions added. W3schools has details.
Input fields can have various attributes like value (initial value), readonly, disabled, size (in chars), maxlength. HTML5 has added a long list of attributes and among interesting are pattern (regexp to validate a field), placeholder, required.