html & css Flashcards

1
Q

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

A

In the head tag

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

In the body tag

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 HTML tag

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

Declare the type of document

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

Give five examples of HTML element tags.

A

p, html, head, title, img

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

Indicates what kind of extra information you are supplying about the element’s content

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 (&copy)

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 will always start 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 will continue on the same line as neighboring elements

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

As much width as the parent div, and the height as much as the content needs

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

Only takes up as much width & height that it needs

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

An ordered list is numbered, while an unordered list is 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

What HTML tag is used to link to another website?

A

Anchor tag

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

What is an absolute URL?

A

A URL that will take you to the specific domain of another website

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

What is a relative URL?

A

A URL that takes you to different pages on the same website.

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

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

A

../

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

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

A

Name of the child folder followed by a slash then the file name

music/listings.html

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 grand parent directory?

A

The name of a child folder, followed by a forward slash, then the name of the grandchild folder, followed by another slash, then the file name.

../../index.html

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 the same directory?

A

Just list the file name

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

What is the purpose of an HTML form element?

A

To submit information to a server

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

Give five examples of form control elements.

A

Radio, Checkbox, Password input, Submit, File upload

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

Give three examples of type attributes for HTML elements.

A

text, password, radio,

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

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

A

inline element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What are the six primary HTML elements for creating tables?
table, tr, td, th, thead, tbody
26
What purpose do the thead and tbody elements serve?
Help distinguish between the main content of the table and the first row
27
Give two examples of data that would lend itself well to being displayed in a table
Financial reports, sport results
28
What are the names of the individual pieces of a CSS rule?
selector & declaration
29
In CSS, how do you select elements by their class attribute?
.class (period)
30
In CSS, how do you select elements by their type?
Use the specific element name
31
In CSS, how do you select elements by its id?
#id (hashtag)
32
Name three different types of values you can use to specify colors in CSS.
RGB, hex codes, some color names
33
What CSS properties make up the box model?
Border, Margin, Padding
34
Which CSS property pushes boxes away from each other?
Margin
35
Which CSS property add space between a box's content and its border?
Padding
36
What is a pseudo-class?
a keyword added to the selector that specifies a specific state
37
What are CSS pseudo-classes useful for?
Allows us to modify how we select elements
38
Name at least two units of type size in CSS.
px, em
39
What CSS property controls the font used for the text inside an element?
font-family
40
What is the default flex-direction of a flex container?
Row
41
What is the default flex-wrap of a flex container?
nowrap
42
Why do two div elements "vertically stack" on one another by default?
They are block level elements
43
What is the default flex-direction of an element with display: flex?
Row
44
What is the default value for the position property of HTML elements?
Static
45
How does setting position: relative on an element affect document flow?
It doesn't affect document flow
46
How does setting position: relative on an element affect where it appears on the page?
Its relative to its original position
47
How does setting position: absolute on an element affect document flow?
It removes it from the document flow
48
How does setting position: absolute on an element affect where it appears on the page?
You specify the distance the element should be from each of the containing element's sides
49
How do you constrain an absolutely positioned element to a containing block?
Make the containing block non-static
50
What are the four box offset properties?
Top, bottom, right, left
51
What are the four components of "the Cascade".
Source order, Inheritance, Specificity, Importance
52
What does the term "source order" mean with respect to CSS?
The order of your css styles in which they are written
53
How is it possible for the styles of an element to be applied to its children as well without an additional CSS rule?
Inherited properties
54
List the three selector types in order of increasing specificity.
Type, class, id
55
Why is using !important considered bad practice?
It breaks the natural cascading in your stylesheet and makes it hard to debug
56
What does the transform property do?
Lets you rotate, scale, skew, or translate an element
57
Give four examples of CSS transform functions.
rotate, scale, skew, translate
58
The transition property is shorthand for which four CSS properties?
transition-delay, transition-duration, transition-property, transition-timing-function
59
Give two examples of media features that you can query in an @media rule.
width, height
60
Which HTML meta tag is used in mobile-responsive web pages?
viewport
61
What is a breakpoint in responsive Web design?
The points at which a media query is introduced because of changes on the screen
62
What is the advantage of using a percentage (e.g. 50%) width instead of a fixed (e.g. px) width for a "column" class in a responsive layout?
Percent's are relative to whatever device is used
63
If you introduce CSS rules for a smaller min-width after the styles for a larger min-width in your style sheet, the CSS rules for the smaller min-width will "win". Why is that?
Because of CSS Cascading (priority)