HTML5 Flashcards
What is the ‘small’ tag used for?
It’s for short pieces of text, such as terms of service, caveats, copyright etc. It should not be used for extended text (i.e. multiple paragraphs).
Small text does not diminish the importance of text contained within it - i.e. if you have something wrapped in a strong tag, it’s still strong regardless of whether it’s in the small tag.
The colgroup tag is used in tables to apply styles to an entire column - what is the problem with using this in HTML 5?
Most of the attributes are not supported in HTML.
Why does the HTML5 doctype not have a version number in it?
It’s considered a living standard and will change as new specifications are released.
Why does HTML5 no longer require a reference to a DTD in the doctype declaration?
Because it is no longer based upon another standard. HTML5 is simply HTML.
Is it possible to have an XML compliant version of HTML5 document?
Yes, you can specify that by adding
the attribute xmlns=”http://www.w3.org/1999/xhtml” to the HTML tag in the document.
Why would you want an XML compliant HTML5 document?
Generally you wouldn’t - but it’s useful if you wanted to parse the document in an XML parser.
Is the HTML tag required?
No - it’s actually optional - but it’s a good idea to use it anyway as it makes the markup clearer. Also there are some bugs relating to this in IE9 and lower.
Why should you always specify that your site is UTF-8 encoded?
You may open yourself up to a XSS attack via UTF-7
What does the following do in IE?
meta http-equiv=’X-UA-Compatible’ content=’ID=Edge’
(note normally in HTML angle brackets)
In IE users can specify how to read a document. This will force IE to use the latest mode for HTML5, possibly preventing XSS attacks.
What is the section tag is used for?
Represents a generic document or section of an application. It should be to stand on it’s own.
What is the header tag used for?
It represents the introductory section of a HTML document or section (note it can appear multiple times in a page, even once for each section).
What is the footer tag used for?
Represents information that should come at the end of a document or section, again, can appear multiple times in a single document.
What is the aside tag used for?
It is used for content that is loosely associated with other content around it, but could be considered separate. An aside will often be visually separated from the content around it by a border or different font.
What is the article tag used for?
Should be used to separate content that could be distributed separately or independantly from other content within the document. This could be something like a blog post or a review. It’s similar to a section, but it should ONLY be used to separate content, not generic sections of the document.
What is the details tag used for?
Contains additional details that a user can choose to show or hide.