HTML Flashcards
What does a doctype do?
Tells the browser what version of HTML and how to render the page.
What’s the difference between full standards mode, almost standards mode and quirks mode?
- Full standards mode is default, and has been since IE 6.
- There are no valid reasons to use anything but
What’s the difference between HTML and XHTML
- HTML is the universal standard
- XHTML is essentially defunct.
How do you serve a page with content in multiple languages?
Adding “lang” attribute to the html element
What are data- attributes good for?
Storing extra data on an element
What are the building blocks of HTML5?
- HTML defines structure (title, header, tables, inputs)
- CSS defines style (font, color, formatting)
- JS defines dynamic behavior
What are cookie, sessionStorage and localStorage?
Client side storage techniques
Describe the difference between script, script async, and script defer tags.
- script interrupts page rendering until script runs
- script async does not interrupt rendering, runs when script is available. Think CDNs.
- script defer runs after rendering
Why is it generally a good idea to position CSS links between head tags and JS scripts just before body tags?
- link tags at the beginning to prevent FOUC
- Scripts at the end to prevent rendering interruptions (unless defer/async)
What is progressive rendering?
-Chunking the HTML into separate blocks that load when each is rendered
HTML templating languages
Jade, Handlebars