HTML Flashcards

1
Q

What does HTML stand for?

A

Hyper Text Markup Language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does a doctype do?

A

It tells the browser which document type to expect.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are data- attributes good for?

A

To store additional data that can be stored and retrieved through JavaScript.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is progressive rendering?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Can you name a few HTML templating languages?

A

Some of them are:
- JSX
- HAML
- EJS
- Handlebars
- Mustache

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Can you name a few empty (non-container) tags in HTML ?

A

<br>
<img>
area
embed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What’s the difference between ids and classes?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is semantic HTML?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the benefits of using semantic HTML?

A

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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

List a few CSS pre-processors you know

A

Sass
Scss
Less
Stylus

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does CSS stand for?

A

Cascading Style Sheet

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How does CSS selector precedence work?

A

The more specific the CSS selector is, the higher is the precedence of the CSS property declarations inside the CSS rule owning the selector.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What’s a pseudo selector?

A

A pseudo-class is used to define a special state of an element.

e.g. the first element of their type, or hovered element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What’s an attribute selector?

A

Selector used to select all the elements that have the specified attribute and applies the CSS property to that attribute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Describe the difference between a cookie, sessionStorage and localStorage.

A
  • 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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Describe the difference between <script>, <script async> and <script defer>.

A

Defer is used for scripts that need the whole DOM and/or their relative execution order is important. And async is used for independent scripts, like counters or ads

17
Q

Why is it generally a good idea to position CSS <link>s between <head></head> and JS <script>s just before </body>? Do you know any exceptions?

A

<link> tags in between the <head> are to prevent Flash of Unstyled Content which gives the user something to look at while the rest of the page is being parsed.

JS blocks rendering by default, so it is usually best to keep scripts at the bottom of the page.

Exceptions are if you grab the scripts asynchronously, or at least defer them to the end of the page.

18
Q

What does SVG stand for?

A

Scalable Vector Graphic