Lesson #2 - Basic CSS Flashcards
If you want to change the color of a heading, what property is used?
style
What’s an example of a syntax for a blue heading using < h2 >?
< h2 style=”color : blue;”> Text < h2 >
If you want to style an element using CSS, what is the first thing you usually write?
< style >
< /style >
If you wanted all h2 elements to be red, what would you type?
< style > h2 { color: red; } < /style >
What is a CSS Class?
Reusable styles that can be added to HTML elements.
Syntax wise, how would you create a class called “blue-text” that contains the color blue?
.blue-text {
color: blue;
}
Which property is used to change the size of the font?
font-size
Which property is used to change the font style?
font-family
True or False: If there is a space in the font-family name, you need to wrap it in quotes.
True
What are the steps to use customized fonts from the Google Font Store?
1) Copy the CSS font link
2) Past the link at the top of the HTML/CSS Page
3) Use the < link > element to import the font
When deciding a font-family, how do you establish a back-up font if the primary font you select is unavailable?
List it after the primary font
Ex. font-family: Helvetica, sans-serif;
Helvetica = Primary, San-serif = Backup
If we wanted to change the size of an image, what property would we use?
width
If you wanted to create a green, 5 pixel border around an HTML element, what would the syntax look like?
< style > .thin-green-border { border-color: green; border-width: 5px; border-style: solid; } < /style >
If you want to change the corners of a square from sharp to round, what property would you use?
border-radius
True or False: You can only determine the border-radius through # of pixels.
False, you can also you %s as well.