HTML Flashcards
What does HTML stand for?
Hyper Text Markup Language
What does a doctype do?
It tells the browser which document type to expect.
What are data- attributes good for?
To store additional data that can be stored and retrieved through JavaScript.
What is progressive rendering?
It is the technique of sequentially rendering portions of a webpage in the server and streaming it to the client in parts without waiting for the whole page to rendered.
Can you name a few HTML templating languages?
Some of them are:
- JSX
- HAML
- EJS
- Handlebars
- Mustache
Can you name a few empty (non-container) tags in HTML ?
<br>
<img>
area
embed
What’s the difference between ids and classes?
They have 2 main differences:
1. The same class can be used on multiple elements; an ID can only be used by one element in the page
2. A single element can have multiple class values, but only one ID.
What is semantic HTML?
Semantic HTML makes use of proper tags, depending on the content being marked up.
For example:
- A p
tag should be used for marking up paragraphs of text
- A table
tag should be used for marking up tabular data
- A nav
tag should be used to lay out your page navigation
What are the benefits of using semantic HTML?
Some of the benefits are:
- Acessibility
- Readability
- Maintainability
- Better UX (using the right tag gives you access to native browser features related to your content)
List a few CSS pre-processors you know
Sass
Scss
Less
Stylus
What does CSS stand for?
Cascading Style Sheet
How does CSS selector precedence work?
The more specific the CSS selector is, the higher is the precedence of the CSS property declarations inside the CSS rule owning the selector.
What’s a pseudo selector?
A pseudo-class is used to define a special state of an element.
e.g. the first element of their type, or hovered element
What’s an attribute selector?
Selector used to select all the elements that have the specified attribute and applies the CSS property to that attribute
Describe the difference between a cookie, sessionStorage and localStorage.
- localStorage data does not expire
- sessionStorage data is cleared when the page session ends
- Cookies data is stored in small text files, on your computer. Cookies are intended to be read by the server.