HTML Flashcards

Questions about html

1
Q

What is <!DOCTYPE html> in HTML5?

A

<!DOCTYPE html> is an HTML5 document type declaration that specifies the document’s type and version to the browser. It ensures the browser renders the page in standards mode.

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

What is the difference between <div> and <span> in HTML?</span>

A

<div> is a block-level element used to group content and create division or sections on a webpage. <span> is an inline-level element used to apply styles or group inline elements.
</span></div>

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

What are semantic tags and non-semantic tags in HTML?

A

Semantic tags in HTML (e.g., <header>, <footer>, <nav>, <article>) convey meaning about the content they contain. Non-semantic tags (e.g., <div>, <span>) do not provide inherent meaning and are used for layout or generic grouping.</span>

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

What is the difference between HTML and HTML5?

A

HTML is the standard markup language for creating web pages. HTML5 is the latest version of HTML, introducing new elements, attributes, and APIs to enhance web development, multimedia support, and compatibility.

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

What is the <iframe> tag in HTML5?

A

<iframe> (Inline Frame) tag in HTML5 is used to embed another HTML document within the current document. It enables displaying external content like maps, videos, or other web pages.
</iframe>

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

What are the formatting tags in HTML?

A

Formatting tags in HTML include <b> (bold), <i> (italic), <u> (underline), <strike> (strikethrough), (subscript), (superscript), etc., used to style text.</strike></u></i></b>

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

What is the difference between <b> and <strong> in HTML?</strong></b>

A

<b> is a presentational tag used to make text bold without conveying specific importance, while <strong> is a semantic tag indicating strong importance, often styled as bold by default.</strong></b>

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

What is the viewport meta tag in HTML?

A

The viewport meta tag (<meta></meta>) in HTML controls how the webpage is displayed on different devices and screen sizes. It sets the initial scale, width, and responsiveness of the page.

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

What are attributes in HTML?

A

Attributes provide additional information about HTML elements. They modify the element’s behavior or appearance and are defined within a start tag (e.g., id, class, src, href).

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

What is a block-level element and an inline element in HTML?

A

Block-level elements (e.g., <div>, <p>, <h1>-<h6>) start on a new line and take up the full width available. Inline elements (e.g., <span>, <a>, <strong>) do not start on a new line and only take up as much width as necessary.</strong></a></span>

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