Visual Rules Flashcards
How do you change the typeface of text
Using the font-family property Example: h1 { font-family: Garamond; }
Web safe fonts
A group of fonts supported across most browsers and operating systems. Other fonts must be downloaded on the user’s computer or with the site
How to change font size?
Using the font size property Example: p { font-size: 18px; } (Note - px stands for pixels)
How to change the font weight?
Using the font-weight property Example: p { font-weight: bold; }
What is the purpose of the <em>normal</em> value for the font-weight property
If all the text is set to bold, you can change a few lines of text to go back to normal if needed.
How to align text in a certain way?
Using the text-align property Example: h1 { text-align: right; }
What is the default text alignment?
Left side of the page
What are the four text alignments?
Left, Right, Center, Justify
What are the two ways color can appear?
Foreground Color and Background Color
Foreground Color: The color of the element
Background Color: The color of the background
How to change the foreground and background color?
Foreground: Use the color property
Background: Use the background-color property
How to change the opacity?
Using the opacity property, pick a value from 0-1 (0 being nothing and 1 being completely solid) Example: h1 { opacity: 0.5 }
How to give an element a background image?
Using the background-image property, use the image's url Example: .main-banner { background-image: url('image-url') }