HTML5 Flashcards
What is the section tag used for?
It is typically used to contain a blob of data. It is usually only used if the data would have a natural heading. The spec says that a section should usually be identified by having a heading (h1-h6) as a child of the section element.
What are the two elements used when quoting text?
< q> and <blockquote>
What is the difference between a block element and an inline element?
Block elements are always displayed as if they have a linebreak after them, inline are displayed inline with text.
What do you call an element with no content?
A void element (br element for example)
HTML has ordered and unordered lists - are there any others?
yes, definition lists. < dl> <dt>Definition term</dt> <dd>Definition Description</dd> < /dl>
What is nesting?
When separate HTML elements are included within each other.
Is the img tag a block or inline element?
inline block (i.e. it is inline, but has some behaviors of block elements)
What role does the h1, h2 etc tags play in SEO?
The higher numbers (i.e. h1) have a higher priority in a search engine result - prioritising sections of page based on heading numbers
What is SEO?
Search Engine Optimisation
How do you configure an “a” element to make a link open in a new window?
Use the “target” attribute - to make it ALWAYS open in a new window, use the value “_blank”.
What is responsive web design?
When a web layout automatically conforms to a devices screen / limitations through use of CSS
What tag do you use to make sure the web page starts at the right scale for a device?
< meta name=”viewport” content=”width=device-width, maximum-scale=1.0, minimum-scale=1.0, initial-scale=1.0” />
What do you use to ensure IE 7 and 8 can deal with HTML5 tags?
HTML5Shiv
How do you make your website use a specific CSS style sheet based on device?
Use the media attribute on the link tag..
< link rel=”stylesheet” type=”text/css” media=”only screen and (min-width:50px) and (max-width:500px)” href=”css/screen_layout_small.css” />
What would be a cause for fonts getting progressively bigger throughout a page?
Not closing off h1 (h2 etc) tags. Opening the tag tells the browser to increase the font, closing it tells it to decrease - not closing means it’s additive.