CSS Flashcards
(45 cards)
What does CSS stands for?
CSS stands for Cascading Style Sheets
What does CSS describe?
CSS describes how HTML elements are to be displayed on screen, paper and in other media
CSS saves alot of work, is this true?
Yes
CSS can control the layout of multiple web pages all at once.
Is this true?
Yes.
What 3 ways can CSS be added to HTML elements?
1.Inline
by using the style attribute in HTML elements
2.Internal
by using a <style> element in the <head> section</style>
3.External
by using an external CSS file
What is the most common way to add CSS?
The most common way to add CSS is to keep the styles in seperate CSS files.
What is an inline CSS used for?
An inline CSS is used to apply a unique style to a single HTML element
The inline CSS uses the style attribute of what?
An inline CSS uses the style attribute of an HTML element.
Give an example of Inline CSS that sets the text color of the <h1> element to blue
<h1 style=”color blue;”This is a blue heading</h1>
What is an internal CSS used for?
An internal CSS is used to define a style for a single HTML page
Where is An internal CSS defined?
An internal CSS is defined in the <head> section of an HTML page, within a <style> element</style>
What is an External CSS used for?
An external style sheet is used to define the style for many HTML pages
What is one way that we can change the look of an entire website?
by changing one file
How to use an external style sheet?
To use an external style sheet, add a link to it in the <head> section of the HTML pae.
Give an example of how an external style sheet is used.
<!DOCTYPE html>
<html>
<head>
<link></link>
</head>
<body>
<h1> Hello </hl>
<p> Bye </p>
</body>
<html>
(style is changed)
</html></h1></body></html>
Give an example of how to change background colour in CSS
body{ background - color:lightblue;}
Give an example of how to change font color in CSS
h1{color:white;}
Give an example of how to change the alignment in CSS
h1{text-align:center;}
Give an example of how to change font type and font size in CSS
p{font-family : Verdana;
font-size:20 px; }
Give an example on how to apply a rounded image in CSS
w3 - round
<img src= “img - snowtops.jpg”
class=”w3- round”
alt = “Norway”
Give an example on how to apply a circled image in CSS
w3 - circle
<img src = “snowtops.jpg”
class+ “w3 - circle”
alt= “Alps>
Give an example on how to apply a bordered Image in CSS
w3-border
<img src = “snowtops.jpg”
class = w3-border w3-padding”
alt - “Alps”>
Give an example on how to apply image as a card in CSS
w3 - card
<div>
<img src=img-avatar.png"
alt="Person">
</div>
Give an example on how apply image text in CSS
w3- display- classes
<div>
<img></img>
<div>Bottom Left</div>
</div>







Hello World
Lorem ipsum...
Hello World
Lorem ipsum...
What does this code display?Hello world
Ut wisi enim...