html Flashcards
(10 cards)
What does the DOM do?
defines the logical structure of documents and the way a document is accessed and manipulated
What does a doctype do?
instructs the web browser about what version of HTML the page is written in.
How do you serve a page with content in multiple languages?
Set the language html tag to a default and provide rules for displaying content in multiple languages using different language elements.
What kind of things must you be wary of when design or developing for multilingual sites?
- Mistranslation
- Content organisation (right to left, left to right)
- Cultural awareness when it comes to stock images and color palate
- Encoding and special characters
What are data- attributes good for?
data-* attributes allow us to store extra information on standard, semantic HTML elements, but it’s not encouraged.
Consider HTML5 as an open web platform. What are the building blocks of HTML5
Semantics, Connectivity, Offline and storage, Multimedia, 2D/3D graphics and effects, Performance and integration, Device access, Styling
Describe the difference between a cookie, sessionStorage and localStorage
cookie
Expiry — Manually set
Persistent across browser sessions — Depends on whether expiration is set
Have domain associated — Yes
localStorage
Expiry — Forever
Persistent across browser sessions — Yes
sessionStorage
Expiry — On tab close
Persistent across browser sessions — No
Have domain associated — No
Describe the difference between , and
.
script: rendered with html
script async: executed asynchronously with HTML
script defer: executed after HTML has rendered
Why is it generally a good idea to position CSS s between and JS s just before
placing at the top allows the page to render progressively which improves user experience
Downloading the scripts at the bottom will allow the HTML to be parsed and displayed to the user first
What is progressive rendering?
the name given to techniques used to render content for display as quickly as possible, (e.g., lazy loading or prioritising visible content)