Chapter 4 Flashcards

1
Q

What is block elements? Examples?

A

It takes up the full width of the space available to them and force the next element down to the new ling on the page.

<div> <h1> </h1><p> tags</p></div>

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

What is inline elements? Examples?

A

Elements only take up space needed to display their content.

<img></img> <span> <a> </a></span>

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

What are the four different positioning properties?

A

Top, bottom, left and right properties

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

What are the three values for overflow property?

A

overflow: scroll;
overflow: hidden;
overflow: visible;

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

What is visible overflow?

A

It is the default value for all elements. And it allows the content to flow outside of its container element.

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

What is hidden overflow?

A

Content inside of an element that takes up more space than the dimensions of the element will not be visible in the browser window.

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

What is CSS?

A

CSS stands for Cascading Style Sheets because styles are usually defined in a separate file or sheet and are read from top to bottom. The latest standard for CSS is CSS3, which also contains all of the older CSS styles and is therefore considered backwards compatible

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

CSS internal, external and inline?

A

Internal= CSS styles can be inserted directly inside the start and end tags of an HTML document using tags

Inline styles are applied directly inside an elements start tag by using the style attribute. Inline styles affect only the element containing the style attribute. Inline styles use a different syntax than internal and external styles. Since the styles are applied directly within an elements start tag, it is not necessary to specify what tag should be selected.

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

What are CSS rules?

A

A rule consists of two parts: a selector (what is to be styled), and a declaration block.

The declaration block contains one or more declarations used to style the selector. Each declaration consists of a CSS property, the selector attribute to be changed and a value, the desired value of the attribute.

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

How to type comments in css?

A

Anything between forward slash and asterisk /* and forward slash */ will not be rendered by the browser.

/This is a CSS comment/

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

What are the common types of CSS selectors>

A

Classes and IDs.

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

What is an ID selector?

A

IDs uniquely identify one element in a document, such as id=”firstName” for the First Name form field. IDs can only be applied one time in a document and elements can only have one ID assigned to it.

ID value is prefixed with the # sign

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

What is a class selector?

A

You use a class to identify one or more elements to be styled in the same manner, such as a group of elements that needs to be in small print or a specific color. Classes can be applied to multiple elements in a document and multiple classes may be applied to an element.

Class value is prefixed with . sign.

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

What is not allowed when using class and ID selector?

A

Class and ID selector names cannot start with a number and cannot include spaces or special characters.

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

What are CSS text properties?

A

text-align:center;
text-decoration:underline;
text-indent:50 px;

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

What are CSS font properties?

A

font-family
font-size
font-style
font-weight

17
Q

What are the four states of Hyperlinks?

A

Unvisited
Visited
Hover
Active

18
Q

What is a pseudo-classes?

A

Pseudo-classes assign a style only when the selector is in a certain state. In this case, the pseudo-class is added to the <a> anchor selector.</a>

19
Q

What are CSS text properties?

A

text-align:center;
text-decoration:underline;
text-indent:50 px;

20
Q

What are CSS font properties?

A

font-family
font-size
font-style
font-weight

21
Q

What are the four states of Hyperlinks?

A

Unvisited (link)
Visited
Hover
Active

22
Q

What is a pseudo-classes?

A

Pseudo-classes assign a style only when the selector is in a certain state. In this case, the pseudo-class is added to the <a> anchor selector.</a>

a: link
a: visited
a: hover
a: active</a>

23
Q

What is inline elements?

A

Inline elements only take up as much space as required to hold the data in them and will be placed on the screen horizontally. The <img></img>, <span> and <a> elements are considered inline-elements because they only take up the space needed to display their content. For example, placing two <img></img> tags next to each other will appear on the same line as long as there is available space.</a></span>

24
Q

What is block elements?

A

Block elements take up the full width of the space available to them and force the next element down to a new line on the page. The <div>, <h1> and </h1><p> tags are block elements because they will force any element or content following them down to the next line on the page.</p></div>

25
Q

what is margin CSS property?

A

It is used to define space on all sides surrounding an element.

you can use the margin-top, margin-bottom, margin-left, and margin-right properties

26
Q

What is float property?

A

Floating is used mainly for images and layouts to float an element to the left or right boundaries of its containing element

float: left;
float: right;

27
Q

What are four positioning properties?

A

The top, bottom, left, and right properties can be used to position elements, but there are also four different types of positioning that will alter how the properties behave.

Static positioning
Relative Positioning
Fixed positioning
Absolute positioning

28
Q

What is Static positioning?

A

Positioning is set by default to static positioning which positions elements according to the normal flow of the page. Static positioning is not affected by the top, bottom, left, and right properties.

29
Q

What are three types of content overflow?

A

overflow: scroll; (more contents will be placed in a scroll box)
overflow: hidden;content inside of an element that takes up more space than the dimensions of the element will not be visible in the browser window
overflow: visible; (default value for all elements; allows the content to flow outside of its container element)

30
Q

What is relative positioning?

A

Relative positioning is used to set the position of an element relative to where it is in the normal flow of the document and is not positioned according to the browser window. For example, if position is set to relative and the top property is set to 100px, as in the example below, then the element will be displayed 100px from the top of the element that it is next to. When relative positioning is used, values for top, bottom, left, and right can also be set to negative values. In addition, relative positioned elements will keep the space that is allotted to the element in the regular flow of the document but will be positioned according to the top, bottom, left, and right properties that are set for the element.
Relative Positioning: position:relative;
top:100px;

31
Q

What is absolute positioning?

A

Absolute positioning places an element relative to the HTML document. Recall that fixed positioning places an element relative to the browser window and not the HTML document. For example, when using absolute positioning you are instructing the element to stay in that position in the document regardless of the other content.
Absolute Positioning: position:absolute;

32
Q

What is z-index?

A

If it is set to z-index:-1;

The content will appear behind another content.

33
Q

What are three types of content overflow?

A

overflow: scroll;
overflow: hidden;
overflow: visible;

34
Q

What is a content overflow?

A

Content overflow defines what happens when there is more content than the element can contain