HTML Flashcards

1
Q

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

A

Inside the opening tag and closing tag of the head element.

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

Where do you put visible content about the HTML document?

A

Inside the opening tag and closing tag of the body element.

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

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

A

Inside the opening and closing tags of 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 document type declaration?

A

To inform the browser of which version of the HTML is being used.

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

Give five examples of HTML element types.

A
h1-h6
p
img
ul/ol
div
em
strong
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

Configure an element to make it more unique with additional behavior.

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

Give an example of an HTML entity.

A

ampersand: &
trademark symbol
copyright symbol

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

What do all HTML entities require?

A

All HTML entities start with an & (ampersand) and end with a ; (semi-colon).

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

How do block-level elements affect the document flow?

A

Block-level elements:

  • start on a new line
  • take up 100% width available
  • push elements that come after it to the next new line
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do inline elements effect the document flow?

A

Inline elements:

  • takes up just the amount of space they need
  • stays “inline”
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 a block-level element?

A

width: 100%
height: auto

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

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

A

width: auto
height: auto

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

What would happen if we place a span element inside a p element?

A

The span element will still show up on the same line since the span element is an inline element. IF the p element is inside the span element, the p element will show up on the next line!

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

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

A
Ordered list (ol) is notated with numerical symbols that shows order.
Unordered list (ul) is notated with bullet points.
Both are customizable with CSS.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

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

A

block-level element

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

What HTML tag is used to link to another website?

A

an “a” element tags

17
Q

What is an absolute URL?

A

A URL that leads to an external file/folder. Usually starts with https://

18
Q

What is a relative URL?

A

A URL that leads to an internal file/folder.

19
Q

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

A

../

20
Q

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

A

child directory name/file name

21
Q

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

A

../../

22
Q

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

A

the specific file name only since it is inside the same “folder” aka directory

23
Q

What is the purpose of an HTML form element?

A

It represents a document section containing interactive controls for submitting information.

24
Q

Give 5 examples of form control elements.

A

input, select, button, textarea, option, etc.

form control elements are those that lets users provide data

25
Q

Give 3 examples of type attribute values for HTML input elements

A

radio, text, submit, checkbox, password, numbers, button, etc.

26
Q

What is the purpose of a label element in a form?

A
  1. It offers accessibility to visually impaired users.
  2. It auto focuses on the input that the label is attached to.
    * ONLY for text that is necessary to understand the purpose of an input
    ex) a radio button that tells the users which option they are choosing
27
Q

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

A

inline element

28
Q

What are the six primary HTML elements for creating tables?

A
table
thead = semantic
tbody = semantic
th = bolds the text
tr
td
*tfoot
29
Q

What purpose do the thead and tbody elements serve?

A

Both thead and tbody element provides useful semantic information.
thead suggests it encapsulates a set of table headings
tbody suggests it encapsulates a set of data

30
Q

Give 2 examples of data that would lend itself well to being displayed in a table

A
  • comparison of products/prices/etc.

- tracking/record keeping of weather/profit/etc.

31
Q

Link vs. Anchor elements?

A

Link element brings things in (importing)

Anchor element takes you elsewhere (makes users leave the page/current location within the page)

32
Q

break vs. div

A

break element is to use on breaking a text that we want to be shown on the next line
div is more appropriate on most of the occassion

33
Q

input type= button VS button

A

for semantic purposes, if it requires a button, use a button