TeamTreeHouse CSS
暂无描述。系统推荐的高质量记忆内容,适合每天坚持背诵学习。
卡片预览 (24 张)
What does css allow for?
css allows for presentation and screensizes and resolutions
What are the three ways to add css to your page?
1- inline styles, 2- internal styles, 3- external stylesheets
How can you inspect an element?
right click it on a webpage
How to make text bold?
font-weight: bold;
how to control size of your font?
font-size: 2 em;
What is another way of expressing the styles “we” create?
author styles
How do we write inline-styles?
we write our css directly in our html element: < body style = “ background - color : orange ; “ > blah < / body >
Should inline-styles be used under best practices?
NO
In the css cascade where do inline-styles fit in?
They override everything.
Where do you place internal styles?
internal styles are placed in the < head > section of your html using a < style > tag.
Code for an internal style …
< head > < title > wha happin? < / title > < style > p { font-size: 20px; font-weight: bold; } < / head >
Are internal styles best practice?
NO
What does D.R.Y. mean?
Don’t Repeat Yourself
Where do you find external stylesheets?
Generally, in the same folder but in a different file as your html.
Why is it best practice to use external styles?
To keep seperate content from presentation.
How would you make text display in the center?
body { text-align: center; }
Where could you go to see if particular css code will work in a particular browser?
https : / / caniuse.com
What are the two main parts of a css rule?
the selector and the declaration
Which is the universal selector?
* { property: value; } the asterisk
How do you control the color of text?
a { color: blue; }
How do you control for the background color of text?
a { background-color: blue; }
How do you get rid of the anchor underline?
a { text-decoration: none; }
What would you do to target just one element of your html?
use an id selector
How do you define an id selector on your html element?
< header > < section id = “ education “ > < ul > ….