Week 1 Quiz Questions Flashcards

1
Q

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

A

It is put in <head></head> (metadata is stored here)

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

It is put in <body></body> (text content/ images is put here)

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

They go between the <html></html> tags (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 which version of HTML to use

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

html element,
head element,
body element,
h1 element,
p element

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

Attributes provide additional information about the contents of an element. They appear on the opening tag of the element and are made up of two parts: a name and a value, separated by an equals sign.

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

Give an example of an HTML entity (escape character).

A

Copyright symbol–
& c o p y ;
& # 1 6 9 ;

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 elements start content on a new line.

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 continue on the same line as the neighboring elements and don’t change/break the flow of content.

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

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

A

A Block-level element occupies the entire horizontal space of its parent element (container), and vertical space equal to the height of its contents, thereby creating a “block”.

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

Inline elements only occupy the space bounded by the tags defining the element, instead of breaking the flow of the content.

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

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

A

Ordered lists (<ol>) are numbered.
Unordered lists (<ul>) are usually 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

Block element.

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

Basic HTML Skeleton Layout:

A

<!DOCTYPE html>

<html>
<head>
<title></title>
</head>

<body></body>
</html>

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

What HTML tag is used to link to another website?

A

<a> tag with the — href =”” — attribute with the URL in the quotations.</a>

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

What is an absolute URL?

A

An absolute URL starts with
the domain name for a website, and can be followed by the path to a specific page.

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

What is a relative URL?

A

Like a shorthand for absolute URLs but you don’t need to specify the domain name– used when linking to other pages on the same site.

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

What is a relative URL?

A

Like a shorthand for absolute URLs but you don’t need to specify the domain name– used when linking to other pages on the same site.

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

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

A

Use–
<a>text content</a>

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

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

A

Use–
<a>text content</a>

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

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

A

Use–
<a>text content</a>

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

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

A

Use–
<a>text content</a>
OR
<a>text content</a>

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

What is the purpose of an HTML form element?

A

HTML form elements allow for the collection of user-inputted information

24
Q

Give five examples of form control elements.

A

<label>
<select>
<input></input>
<option></option></select></label>

<textarea>
</textarea>

25
Q

Give three examples of type attribute values for HTML <input></input> elements.

A

type=”text”
type=”radio”
type=”checkbox”

26
Q

Is an HTML <input></input> element a block element or an inline element?

A

Inline-block

27
Q

What are the six primary HTML elements for creating tables?

A

<table>
<tr>
<td>
<thead>
<tbody>
</tbody></thead></td></tr></table>

28
Q

What purpose do the thead and tbody elements serve?

A

The <thead> element defines a set of rows defining the head of the columns of the table.
The <tbody> element encapsulates a set of table rows (<tr> elements), indicating that they comprise the body of the table (<table>).

29
Q

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

A

Financial reports, TV schedules, and sports results.

30
Q

What are the names of the individual pieces of a CSS rule?

A

CSS rules need:
- a selector (h1, p, {}, #id, .class)
-declaration/ declaration block that contains:
properties and values

31
Q

In CSS, how do you select elements by their class attribute?

A

Class attributes are selected by doing: “.classAttribute {}”

32
Q

In CSS, how do you select elements by their tag name?

A

If using the <p> tag, CSS selector is just p {}

33
Q

In CSS, how do you select an element by its id attribute?

A

ID attributes are selected by doing: “#idAttribute {}”

34
Q

Distinguish the difference(s) between the class attribute and the id attribute.

A

Use the class attribute if needing to adjust multiple things in CSS. id attributes only can be used once and are thus very specific.
Typically will use class attributes more in CSS and id attributes more in Javascript

35
Q

Name three different types of values you can use to specify colors in CSS.

A

RGB: rgb(100, 100, 90)
Hex Code: #ee3e80
Color Name: LightBlue

36
Q

What CSS properties make up the box model?

A

The margin, border, padding (& content contained within)

37
Q

Which CSS property pushes boxes away from each other?

A

Margin

38
Q

Which CSS property add space between a box’s content and its border?

A

Padding

39
Q

What is a pseudo-class?

A

A pseudo-class is a keyword added to a selector that specifies a special state of the selected element(s).
ex– .class:pseudo {}

40
Q

What are CSS pseudo-classes useful for?

A

Allows for different styles for certain states.

41
Q

Name two types of units that can be used to adjust font-size in CSS.

A

px/ pixels
em- 1em is standard size inherited, 1.5em is 150%

41
Q

Name two types of units that can be used to adjust font-size in CSS.

A

px/ pixels
em- 1em is standard size inherited from parent, 1.5em is 150%
if parent is 20px, 2em is equivalent 40px
rem always refers to the root size of the html doc instead of direct parents.

42
Q

What CSS property controls the font used for the text inside an element?

A

font-family

43
Q

What is the default flex-direction of a flex container?

A

Row (Left to right)

44
Q

What is the default flex-wrap of a flex container?

A

nowrap (will have all content on one line)

45
Q

Why do two div elements “vertically stack” on one another by default?

A

Because they are block elements.

46
Q

What is the default flex-direction of an element with display: flex?

A

Row (left to right)

47
Q

What are the three primary components of a page layout? (Which helper classes do you need?)

A

container, row, column

48
Q

What is the minimum number of columns that you should put in a row?

A

1 column minimum for a row

49
Q

What is the purpose of a container?

A

Contains the whole layout (columns and rows) and establishes minimum width of the layout.

50
Q

What is the default value for the position property of HTML elements?

A

position: static;

51
Q

How does setting position: relative on an element affect document flow?

A

still in the flow of the document and doesn’t break flow of the other items .

52
Q

How does setting position: relative on an element affect where it appears on the page?

A

moves an element relative to where that element NORMALLY would have been unless using top, bottom, right, left property.

53
Q

How does setting position: absolute on an element affect document flow?

A

It is taken out of normal flow and is independent of the position/flow of other elements and vice versa.

54
Q

How does setting position: absolute on an element affect where it appears on the page?

A

by default, moves objects to the nearest non static ancestor.

55
Q

How do you constrain an absolutely positioned element to a containing block?

A

absolute positioned elements position themselves absolutely within the confines of the first encountered position that is NOT :static (ie relative, absolute, fixed) block/element.

56
Q

What are the four box offset properties?

A

top, bottom, left, right