HTML Flashcards

(54 cards)

1
Q

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

A

In 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

In 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

Within the opening and closing HTML elements

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

What is the purpose of DOCTYPE declaration

A

It lets the browser know what version of HTML it is using.

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

Head, body, title, meta, p

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

the attribute name indicates what kind of extra information you are supplying about the elements 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 ©

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

The take up all horizontal space in a 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

They take up the same line as their 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

Width is 100% and height is auto.

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

Width is auto and height is auto.

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 uses numbers and an unordered list uses 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

Its 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

the anchor tag aka the a tag.

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

What is an absolute URL?

A

An absolute URL links a url that is on a different website. and is the full web address starting with the http

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

What is a relative URL?

A

a relative URL links a webpage on the same website and doesn’t need the full web address.

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

../index.html

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

the name of the directory/file

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

../../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

index.html/

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

Forms allow you to collect information from different visitors to your site.

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, submit, text, button, checkbox

23
Q

Give three examples of type attributes for HTML <a></a> elements.

A

checkbox email textbox

24
Q

Is an HTML input element a block or inline element?

A

inline element

25
What are the six primary HTML elements for creating tables?
table, tr, th, thead, tbody, td
26
What purpose do the thead and tbody elements serve?
Body and head are additional elements that help screen reader seo and indexing
27
Give two examples of data that would lend itself well to being displayed in a table.
grades, sports statistics and basically anything that can go into an excel document.
28
What are the names of the individual pieces of a CSS rule?
rule set, selectors, declaration block, properties and values
29
In CSS, how do you select elements by their class attribute?
using the . before the attribute
30
In CSS, how do you select elements by their type?
you put them as a selector in the css ruleset
31
In CSS, how do you select an element by its id attribute?
using the # before the attribute
32
Name three different types of values you can use to specify colors in CSS.
hexadecimal notation, rgb function, color names and hsl
33
What css properties make up the box model?
border margin and padding
34
Which CSS property pushes boxes away from each other?
The margin
35
Which CSS property adds space between a box's content and its border?
The padding
36
What is a pseudo-class?
Its a keyword added to a selector that specifies a special state of the selected element
37
What are CSS pseudo-classes useful for?
They can change the appearance of elements when a user interacts with them.
38
Name at least two units of type size in CSS.
Pixels percentages, and ems
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're block 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 element?
static
45
how does setting position: relative on an element affect the document flow?
It flows like a normal page would
46
How does setting position: absolute on an element affect the document flow?
It is taken out of normal flow and the other elements act like its not there
47
How does setting position: absolute on an element affect where it appears on the page?
it is taken out of normal flow and the other elements act like its not there
48
How do you constrain an absolutely positioned element to a containing block?
When the ancestor/parent elements have a position property explicitly defined if none are defined its attached to the viewport. put a position thats not static on it.
49
What are the four box offset properties?
top bottom left right
50
Give two examples of media features that you can query in a @media rule.
min width and max width
51
Which HTML meta tag is used in mobile-responsive web pages?
viewport meta tag
52
What is a breakpoint in responsive Web design?
Its the points at which a media query is introduced where if it wasn’t introduce the viewport would break.
53
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?
with percentages the layout adapts to the exact dimensions of the viewport's width.
54
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 its already at its minimum width and source order says the latest property is stronger.