Basic HTML Flashcards

1
Q

Try to write out the structure of an HTML5 boilerplate.

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

What does β€œ< !DOCTYPE html >” do?

A

Declaration is an instruction to the web browser to parse the page as HTML5.

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

What is the root element of which all other elements are children of?

A

The HTML element

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

What does the head element do?

< head >< /head >

A

The head element contains metadata about the HTML document.

This is where we bundle together the various elements that tell the browser about our document.

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

What does the meta element do?

< meta >

A

Metadata. The meta element is versatile. Each instance contains different information about the document

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

What does the title element do?

< title >< / title >

A

Web browsers display the text in the title element in the browser tab.

Web crawlers also look to this element to help classify web pages, so it plays an important part in SEO.

The title element is required for all HTML documents.

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

What does the link element do?

< link >

A

The link element creates a link between the HTML document and other resources, such as stylesheets.

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

What does the body element do?

< body >< /body>

A

Delineates the main displayable elements of a web page.

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

What does the script element do?

< script >< /script >

A

The script element is used to define the frontend JavaScript for a web page.

It can either link to an external JS file (which is how we’ll use it in this course) or contain scripts directly in the HTML file.

The script element can live in the

or the depending on which features you want to load first.

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

What does this line do:

< html lang=”en” >

A

lang attribute identifies the language of text content.

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

What does this line do?

< meta charset=”UTF-8” >

A

charset defines the character encoding for the doc.

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

What does this line do:

<meta name=”viewport” content=”width=device-width, initial-scale=1”>

A

width=device-width sets the width of the page to follow the screen-width of the device.

initial-scale=1 sets the zoom level when the page is loaded for the first time.

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

What does β€˜name=”viewport”’ do?

A

viewport gives the browser instructions on how to control the page’s dimensions and scaling.

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

What does this line do:

<meta http-equiv=”X-UA-Compatible” content=”ie=edge”>

A

Used to solve compatibility issues.

Chooses what version of IE the page should be rendered as.

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

What does this line do:

<meta name=”description” content=””>

A

Provides brief summary of a web page.

Search engines often display the meta description (typically up to 160 char long).

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

What is the < div > tag used for?

A

Generic container element used to group together content.

17
Q

What is HTML?

A

(Hyper Text Markup Language), which is the language used to describe the structure of a web page.