CSS Flashcards
What does CSS stand for?
Cascade style sheets
What kind of language is it?
Scripting language used to describe layout and styles of a webpage.
What is the main goal of CSS?
To create consistent web pages
What are the main advantage of CSS?
- the formatting of the webpage can be separated from content hence it can be reused and designer can focus on 1 thing at a time
What are the 2 ways of adding CSS?
- inline
- internal or embedded
- external style sheet
What is an inline method of adding styling to a webpage?
A one- off change to a singular element of a html document e.g. <p style="float:left;">RAW TEXT</p>
What else can we use to describe the colour?
hexadecimal code
What is the embedded/internal styling method?
Where the CSS code is added within the head.
It is the actual CSS code that applies throughout the content of webpage
What is the external style sheet styling method?
Where a link to a css stylesheet is defined within the head and contents of body are linked to it. This is done using the tag. This one comes with reusability between webpages.
What are the identifiers and class selectors?
‘hooks’ onto which we can hang the styles
What is an identifier?
# id in html file { max - width:800px; font-family: Arial; padding: 30px; background-color: white; margin : 20px auto ; font-size: 20px text-allign:left: }
What is a class?
work in a similar way to an identifier but uses a . prefix
e.g. .list
These can be applied multiple times within a webpage compared to identifier which are only used for element of that unique name
id in html file?
an attribute when defining element e.g <div></div>
class in html file?
an attribute when defining an element e.g. <div class="list"></div>
What are some CSS properties?
border-color background-color border-width font-family font-size height width color border-style (solid,double or outset)