Devsketch's Learning Station
HTML5 and CSS3
1. HTML5 and CSS
|
My Files
|
Original Student Files
|
Differences to note in HTML5
- The align attribute has been removed, use CSS instead.
- No / needed for tags that don't need a closing tag.
<br> <hr> <meta>
- <blockquote> : Used for a block of quoted text, ONLY!
- Use <em> if you are emphasizing something.
- Use <strong> if you are stating something important.
- Use i for italics or b for bold, only if you just want to do so visually, but then ask yourself, why are you doing that? Is it because of emphasis or importance or perhaps something else.
- New phrase elements (similar to em and strong):
- abbr: abbreviation
- b: bold text, just to style
- cite: citation or reference
- code: identifies code
- dfn: definition of a word or term
- em: text to be emphasized
- i: italic text, just to style
- kbd: identifies keyboard input, like Ctrl+C
- mark: highlights text in order to be easily referenced
- samp: shows program sample output
- small: defines a smaller text, like this should be smaller
- strong: shows strong importance
- sub: subscript, small text below the baseline
- sup: superscript, small text above the baseline
- var: identifies and displays a variable output
- And many more...
- Ordered List "type=" attribute:
- 1: Numerals (default)
- A: Uppercase Letters
- a: Lowercase Letters
- I: Uppercase Roman numerals
- i: Lowercase Roman numerals
- Ordered lists also have a
start= attribute, on what number to start. It also has a reversed="reversed" attribute, to indicate a list is in descending order.
- Unordered Lists:
- To change the list marker (bullet) in HTML5, do NOT do so by "type", instead use CSS.
- The type attribute is obsolete in HTML5 for unordered lists
- Description Lists
<dl>:
- The Term
<dt>
- The definition goes in after the term tag has closed. The definition tag is
<dd>.
- Anchor tags <a>, can now include divs, h1, paragraphs, etc. inside the anchor tags, you will then be able to click anywhere you want within them to go to the link, including whitespace.
- Structural HTML elements
- <header>
- Contains the header of the web page or section or article of the document, often includes a heading level element h1-h6.
- <nav>
- Contains a section of navigational links.
- <main>
- Contains the main content of the web page
- <div>
- Not used as often. The other tags would be used instead, especially section.
- <section>
- Used to divide sections of a document, chapter, or topics.
- <article>
- Presents independent entries, such as blog posting, comment, or e-zine articles that could stand on their own.
- <aside>
- Indicates a sidebar.
- <footer>
- Contains the footer of the page, could be combined with small to display copyright.