HTML & CSS Concepts Flashcards

1
Q

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

A

They are put inside 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

You put them 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

This declaration tells the browser to use the latest version of HTML

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, span, div, html

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

all HTML elements can have attributes added, which modifies the way the element functions.

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

How do block-level elements affect the document flow?

A

these block-level elements will always start on a new line. What ever content follows these elements will also start on a new line

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

How do inline elements affect the document flow?

A

Inline elements will continue on the same line as long as there is space to do so

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

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

A

The default width is 100% but the default height depends on the content inside the block element

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 an inline element?

A

the width and height depends on the content of the element

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

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

A

An ordered list will create a numerically ordered list of your items (starting with 1) while an unordered list will use bullet points instead.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
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
13
Q

What HTML tag is used to link to another website?

A

< a href=”http://www.SampleWebPage.com” > HTML text content here < /a >

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

What is an absolute URL?

A

an absolute URL gives all information about a page’s location. For example, www.MyStore.com/products/sales/videogames

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

What is a relative URL?

A

A relative URL is a link on your own personal computer domain. Examples would be links to other files or folders that are parents/children/grandparents/etc. of one another

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

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

A

use < a href = ‘’.. / samplePicture.jpg’’ > < / a >

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 child directory?

A

use < a href = ‘‘NameOfChildFolder/samplePic.jpg’’ > < / a >

18
Q

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

A

use < a href = ‘’.. /.. /samplePicture.jpg’’ > < / a >

19
Q

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

A

use < a href = ‘‘samplePicture.jpg’’ > < / a >

20
Q

What is the purpose of an HTML form element?

A

it is used to wrap around user input types. Not technically required but we should use it for better engine recognition as well as screen readers

21
Q

Give five examples of form control elements.

A

< form > < fieldset > < textarea > < button > < label >

22
Q

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

A

input types include: text, email, password, checkbox, radio and many more

23
Q

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

A

inline element

24
Q

What are the six primary HTML elements for creating tables?

A

< table >, < tr > , < td > , < thead > , < tbody >

25
Q

What purpose do the thead and tbody elements serve?

A

The table head and table foot should contain information about the table’s columns (mainly name) . The table body should contain rows of table data (mainly name if horizontal name labels are needed.)

26
Q

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

A

by using .classNameHere

27
Q

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

A

by typing the direct name

28
Q

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

A

a CSS rule consists of a selector and a declaration block. inside the block can have properties and values too

29
Q

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

A

By using #IdNameHere

30
Q

What CSS properties make up the box model?

A

content, padding, border, and margin

31
Q

Which CSS property pushes boxes away from each other?

A

The margin

32
Q

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

A

Padding

33
Q

What is a pseudo-class?

A

it is a CSS specific class that helps you select nested elements or special elements (such as odd/even) examples include nth-child or hover

34
Q

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

A

ROW

35
Q

What is the default flex-wrap of a flex container

A

no wrap, they will remain on a single line

36
Q

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

A

static (normal)

37
Q

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

A

it does not affect it

38
Q

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

A

actually it does nothing, unless top, left, bottom, or right properties are also included

39
Q

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

A

it takes the element OUT of the normal document flow, so that it can be repositioned as you please

40
Q

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

A

it will appear inside the next closest non static parent ( parents usally set to position relative)

41
Q

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

A

by setting its parent container’s position to relative

42
Q

What are the four box offset properties?

A

top, right, bottom ,left