HTML Flashcards

1
Q

Where do you put non-visible content about the HTML document?

A

In the head. It holds the metadata

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

Where do you put the visible content about the HTML document?

A

In the body. It holds what will be displayed on the page.

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

Where do the head and the body tags go in a valid HTML document?

A

In the HTML element.

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

What is the purpose of a !DOCTYPE declaration?

A

Tells the browser what sort of document it will be encountering (HTML 4 or 5, etc.)

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

Give 5 examples of HTML element types.

A
  • head
  • body
  • p
  • img
  • h1
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the purpose of HTML attributes?

A

They give additional info about the element they are on

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

Give an example of HTML entity (escape character).

A

Ampersand or Copyright

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

How do block-level elements affect the document flow?

A

Block-level elements appear on a separate line and takes up the entire line its on

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

How do inline elements affect the document flow?

A

Inline elements affect the text in the line and does not create a new line for a new block

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

What are the the default width and height of a block-level element?

A

100% (width) by auto (height)

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

What are the default width and height of an inline-element?

A

Auto (width) by auto (height)

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

What is the difference between and ordered list and an unordered list in HTML?

A

Ordered lists are bulleted with numbers

Unordered lists are bulleted with just bullet points

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

Is an HTML list a block element or an inline element?

A

HTML lists are block elements

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

What HTML tag is used to link to another website?

A

Anchor tag (a href= “ “)

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

What is an absolute URL?

A

Links to another page outside of our current document

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

What is a relative URL?

A

Links to a file within the file/document

17
Q

How do you indicate the relative link to a parent directory?

A

../file name

18
Q

How do you indicate the relative link to a child directory?

A

child folder name/file name

19
Q

How do you indicate the relative link to a grand parent directory?

A

../../file name

20
Q

How do you indicate the relative link to the same directory?

A

/file name

21
Q

What is the purpose of an HTML form element?

A

Collects user input in HTML document

22
Q

Give 5 examples of form control elements (elements that compose the form).

A
  • option
  • select
  • text area
  • input
  • button
23
Q

Give 3 examples of type attribute values for HTML input elements.

A
  • text
  • radio
  • checkbox
24
Q

Is an HTML input element a block element or an inline element?

A

Inline element

25
Q

What are the 6 primary HTML elements for creating tables?

A
  • table
  • tr (table row)
  • td (table data)
  • th (table header)
  • thead
  • tbody
26
Q

What purpose do the thead and tbody elements serve?

A

Thead is the heading info at the top of the column

Tbody shows and stores the actual content

27
Q

What is a client?

A

A computer or application that sends requests to and receives responses from a server

28
Q

What is a server?

A

A computer or application that listens for requests form and sends responses to clients

29
Q

Which HTTP method does a browser issue to a web server when you visit a URL?

A

‘GET’

30
Q

What 3 things are on the start-line of an HTTP request message?

A
  • HTTP methods like ‘GET’ or ‘POST’
  • a request target, usually a URL
  • HTTP version which defines what the rest of the message will look like
31
Q

What 3 things are on the start-line of an HTTP-response message?

A
  • The protocol version (usually HTTP/1.1)
  • The status code, like 404, 403, or 200
  • The status text, which is a human readable message about the status code (Not Found, Forbidden, etc.)
32
Q

What are HTTP headers?

A

HTTP headers come after the start line and before the empty line + body of HTTP requests and responses
They hold additional information about a request/response being sent from a client/server

33
Q

Where would you go if you wanted to learn more about a specific HTTP header?

A

MDN

34
Q

Is a body required for a valid HTTP request or response message?

A

No, its optional