CSS Flashcards
h1, h2, p {
text-align: center;
}
aligns to center of page
id value
selected to target a specific element with an id attribute
/* */
creates a comment
margin-left: auto;
margin-right: auto;
margin as invisible space around an element.
.class
another way to link <div> to css
background-image: url()
sets background image
.item p {
display: inline-block;
}
displays code on the same line even if they are different paragraphs
padding-left,right,bottom,top
gives some space between the content and the sides.
max-width
prevent width from growing too wide.
font-family
allows you to change the font
What is this doing?
font-family: Impact,serif;
Acting as a allbacks are used in instances where the initial is not found/available.
font-size
size of text
border-color
changes color of border
a:visited {
color: grey;
}
changes the color to grey when page is visited.
a:hover {
color: brown;
}
if you hover over a text it will change the color to brown
a:active{
color: white;
}
changes link color to white if link to clicked.
what do the inputs mean hsl(240,100%,50%)
hue of color wheel, saturation and lightness
rgb(200,13,45)
mixed of red green and blue on rgb wheel
linear-gradient(90deg,hex,rgb or hsl)
allows to add a gradient of two colors on each side and joins them together