12 Text Flashcards
What are some basic CSS text modifiers? (7 things) (excluding color)
Font family Weight Style (italic/oblique) Size, also height/width Spacing Casing Uppercase/Lowercase Decoration Underline/Strike
What are some paragraph control properties? (2 things)
Alignment
Indent
Control font type
Have backup fonts
font-family: Georgia, Times, serif
The first fonts take precedence. The proceeding fonts are used in the preceding ones are not present.
Control text size
What are the options for units?
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)
What’s the best font size option(s)? why?
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.
Set a font assuming the user doesn’t have it installed
@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;}
Upload a font that can be linked to for use in an @font-face
https://www.fontsquirrel.com/tools/webfont-generator
Set bold or normal
.credits {
font-weight: bold;}
font-weight: normal;
Set italic, oblique or normal
What is oblique?
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.
Make text all lower case, all upper case, or force capilization of first letter of each word.
h1 { text-transform: uppercase;} h2 { text-transform: lowercase;} .credits { text-transform: capitalize;}
add underline, overline, link through or animation that makes it blink.
text-decoration: none; text-decoration: underline; text-decoration: overline; text-decoration: line-through; text-decoration: blink;
can something be underlined and struck through?
no,
The text-decoration property can only have 1 value.
control leading (vertical space between lines).
line-height: 1.4em;
or px
name for part of letter that drops below the baseline
Name for highest part of the letter
descender
ascender
Line height is from baseline to ascender
t or f
false
It’s from ascender top to descender bottom