HTML Flashcards

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
Q

What are the six primary HTML elements for creating tables?

A

table, tr, th, thead, tbody, td

26
Q

What purpose do the thead and tbody elements serve?

A

Body and head are additional elements that help screen reader seo and indexing

27
Q

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

A

grades, sports statistics and basically anything that can go into an excel document.

28
Q

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

A

rule set, selectors, declaration block, properties and values

29
Q

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

A

using the . before the attribute

30
Q

In CSS, how do you select elements by their type?

A

you put them as a selector in the css ruleset

31
Q

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

A

using the # before the attribute

32
Q

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

A

hexadecimal notation, rgb function, color names and hsl

33
Q

What css properties make up the box model?

A

border margin and padding

34
Q

Which CSS property pushes boxes away from each other?

A

The margin

35
Q

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

A

The padding

36
Q

What is a pseudo-class?

A

Its a keyword added to a selector that specifies a special state of the selected element

37
Q

What are CSS pseudo-classes useful for?

A

They can change the appearance of elements when a user interacts with them.

38
Q

Name at least two units of type size in CSS.

A

Pixels percentages, and ems

39
Q

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

A

font-family?

40
Q

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

A

ROW

41
Q

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

A

NOWRAP

42
Q

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

A

they’re block elements

43
Q

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

A

row

44
Q

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

A

static

45
Q

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

A

It flows like a normal page would

46
Q

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

A

It is taken out of normal flow and the other elements act like its not there

47
Q

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

A

it is taken out of normal flow and the other elements act like its not there

48
Q

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

A

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
Q

What are the four box offset properties?

A

top bottom left right

50
Q

Give two examples of media features that you can query in a @media rule.

A

min width and max width

51
Q

Which HTML meta tag is used in mobile-responsive web pages?

A

viewport meta tag

52
Q

What is abreakpointin responsive Web design?

A

Its the points at which a media query is introduced where if it wasn’t introduce the viewport would break.

53
Q

What is the advantage of using a percentage (e.g.50%)widthinstead of a fixed (e.g.px)widthfor a “column” class in a responsive layout?

A

with percentages the layout adapts to the exact dimensions of the viewport’s width.

54
Q

If you introduce CSS rules for a smallermin-widthafterthe styles for a largermin-widthin your style sheet, the CSS rules for thesmallermin-widthwill “win”. Why is that?

A

Because its already at its minimum width and source order says the latest property is stronger.