12 Text Flashcards

1
Q

What are some basic CSS text modifiers? (7 things) (excluding color)

A
Font family 
Weight
Style (italic/oblique)
Size, also height/width
Spacing
Casing Uppercase/Lowercase
Decoration Underline/Strike
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are some paragraph control properties? (2 things)

A

Alignment

Indent

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

Control font type

Have backup fonts

A

font-family: Georgia, Times, serif

The first fonts take precedence. The proceeding fonts are used in the preceding ones are not present.

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

Control text size

What are the options for units?

A

font-family: Arial, Verdana, sans-serif;
font-size: 12px;

px, (the # of pixels text takes up)
% (% of 16 px, the default size of text in browsers)
em (‘m’ lengths. Number of lengths of the letter m. relative to size in parent element)

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

What’s the best font size option(s)? why?

A

px is great for alignment to images.

em makes the font size change when system font sizes change and when parent element font size changes.

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

Set a font assuming the user doesn’t have it installed

A

@font-face {
font-family: ‘ChunkFiveRegular’;
src: url(‘fonts/chunkfive.eot’) format(‘embedded-opentype’);}
}
font-family to specify the name to be used in the font-family value later

src to specify path. (you will have to offer many with different types so they can be used by all browsers. Just offer then separated by commas under src)

format to specify font type

h1, h2 {
font-family: ChunkFiveRegular, Georgia, serif;}

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

Upload a font that can be linked to for use in an @font-face

A

https://www.fontsquirrel.com/tools/webfont-generator

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

Set bold or normal

A

.credits {
font-weight: bold;}

font-weight: normal;

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

Set italic, oblique or normal

What is oblique?

A

font-style: italic;
font-style: oblique;
font-style: normal;

Oblique is the font slanted. Italic is created.
When it can’t find italic, it just makes it oblique. The average person can’t tell the difference.

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

Make text all lower case, all upper case, or force capilization of first letter of each word.

A
h1 {
text-transform: uppercase;}
h2 {
text-transform: lowercase;}
.credits {
text-transform: capitalize;}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

add underline, overline, link through or animation that makes it blink.

A
text-decoration: none;
text-decoration: underline;
text-decoration: overline;
text-decoration: line-through;
text-decoration: blink;
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

can something be underlined and struck through?

A

no,

The text-decoration property can only have 1 value.

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

control leading (vertical space between lines).

A

line-height: 1.4em;

or px

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

name for part of letter that drops below the baseline

Name for highest part of the letter

A

descender

ascender

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

Line height is from baseline to ascender

t or f

A

false

It’s from ascender top to descender bottom

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

What’s a good standard distance between lines?

What’s a good rule of thumb?

A

1.4 to 1.5 em

should be more than the space between each word

17
Q

What is kerning

A

spacing between letters

18
Q

control spacing between words

control spacing between letters (kerning)

A

word-spacing: 0.2em;}

letter-spacing: 1em

19
Q

Align text left, right, center, or justify

A
h1 {
text-align: left;}
p {
text-align: justify;}
.credits {
text-align: right;}

text-align: center;

20
Q

Align text with an inline element ( top, bottom, etc) similar to align attribute in HTML

A
#six-months {
vertical-align: text-top;}
#one-year {
vertical-align: baseline;}
#two-years {
vertical-align: text-bottom;}

Top, middle and bottom also work

21
Q

Add an indent

A

.credits {
text-indent: 20px;

or ems

22
Q

Keep an element in HTML but push it out of view

A

text-indent: -9999px;

23
Q

Add a shadow

What is the order of parameters

A
text-shadow: 1px 1px 3px #666666;}
how far to left or right
how far to top or fottom
amount of blur
color
24
Q

select the first letter or first line

A

p.intro:first-letter {
font-size: 200%;}
p.intro:first-line {
font-weight: bold;}

25
Q

Select a link

Select a link that’s been visited already

A

a:link {
color: deeppink;
text-decoration: none;}
a:visited {
color: black;}

26
Q

Select the state of being hovered over

A

a:hover {
color: deeppink;
text-decoration: underline;}

27
Q

Select the state of being clicked (whether a button or not)

A

a: active {
color: darkcyan;}

28
Q

Select the state of ‘focussed’ (tabbed to, text box clicked on etc)

A

a: focus {
color: darkcyan;}

29
Q

Select an element if it has a specific attribute

A

[ ] for all elements
or:
p[class]
p[id]

p[class]
Targets any <p> element with an
attribute called clas</p>

30
Q

Select an element if it has a specific attribute with a specific value

A
=
p[class="dog"]
Targets any <p> element with
an attribute called class whose
value is dog</p>
31
Q

Select an element if it has a specific attribute with a value that contains this string (separated by spaces)

A
p[class~="dog"]
Targets any <p> element with
an attribute called class whose
value is dog</p>
32
Q

Select an element if it has an attribute that begins with a specific string

A

p[attr^”d”]
Targets any <p> element with
an attribute whose value begins
with the letter “d</p>

33
Q

Select an element if it has a specific attribute with a value that contains this substring

A

p[attr*“do”]
Targets any &ltp> element with an
attribute whose value contains
the letters “do

34
Q

Select an element if it has an attribute that ends with a specific string

A

p[attr$”g”]
Targets any <p> element with an
attribute whose value ends with
the letter “g”</p>