Technical Questions (HTML) Flashcards

These are the questions about system structure and not necessarily about coding. (11 cards)

1
Q

What does a doctype do?

A

Defines the document type and version of HTML

It helps browsers render the page correctly.

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

How do you serve a page with content in multiple languages?

A

Use the lang attribute in the HTML tag and provide localized content

This ensures accessibility and proper rendering for different languages.

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

What kind of things must you be wary of when designing or developing for multilingual sites?

A
  • Text direction
  • Character encoding
  • Cultural differences
  • SEO considerations

Each of these factors can affect user experience and site performance.

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

What are data- attributes good for?

A

Storing custom data private to the page or application

They allow for easy access to data in JavaScript without affecting the DOM.

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

Consider HTML5 as an open web platform. What are the building blocks of HTML5?

A
  • Semantics
  • Connectivity
  • Offline capabilities
  • Storage
  • Multimedia

These features enhance the functionality and user experience of web applications.

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

Describe the difference between a cookie, sessionStorage, and localStorage.

A
  • Cookie: Small data stored on the client, sent with every HTTP request
  • sessionStorage: Data stored for the duration of the page session
  • localStorage: Data stored with no expiration date

Each has different use cases and storage limits.

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

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

A
  • <script>: Blocks rendering until loaded
  • <script async>: Loads in parallel without blocking rendering
  • <script defer>: Loads after the document has been parsed

These attributes affect how scripts are executed and page performance.

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

To ensure styles are loaded before scripts execute

An exception is when critical CSS is needed immediately for rendering above-the-fold content.

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

What is progressive rendering?

A

Loading and displaying content incrementally as it becomes available

This improves perceived performance and user experience.

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

Why would you use a srcset attribute in an image tag? Explain the process the browser uses when evaluating the content of this attribute.

A

To provide multiple image sources for different screen resolutions

The browser selects the most appropriate image based on the device’s display characteristics.

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

Have you used different HTML templating languages before?

A

Yes/No

This question assesses familiarity with various templating systems.

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