Podcast
Questions and Answers
What does CSS stand for?
What does CSS stand for?
Cascading Style Sheets
What is the correct HTML for referring to an external style sheet?
What is the correct HTML for referring to an external style sheet?
Where in an HTML document is the correct place to refer to an external style sheet?
Where in an HTML document is the correct place to refer to an external style sheet?
In the
section
Which HTML tag is used to define an internal style sheet?
Which HTML tag is used to define an internal style sheet?
Which HTML attribute is used to define inline styles?
Which HTML attribute is used to define inline styles?
Which is the correct CSS syntax?
Which is the correct CSS syntax?
How do you insert a comment in a CSS file?
How do you insert a comment in a CSS file?
Which property is used to change the background color?
Which property is used to change the background color?
How do you add a background color for all
elements?
How do you add a background color for all
elements?
Which CSS property is used to change the text color of an element?
Which CSS property is used to change the text color of an element?
Which CSS property controls the text size?
Which CSS property controls the text size?
What is the correct CSS syntax for making all
elements bold?
What is the correct CSS syntax for making all
elements bold?
How do you display hyperlinks without an underline?
How do you display hyperlinks without an underline?
How do you make each word in a text start with a capital letter?
How do you make each word in a text start with a capital letter?
Which property is used to change the font of an element?
Which property is used to change the font of an element?
How do you make the text bold?
How do you make the text bold?
How do you display a border like this: The top border = 10 pixels, The bottom border = 5 pixels, The left border = 20 pixels, The right border = 1 pixel?
How do you display a border like this: The top border = 10 pixels, The bottom border = 5 pixels, The left border = 20 pixels, The right border = 1 pixel?
Which property is used to change the left margin of an element?
Which property is used to change the left margin of an element?
When using the padding property, are you allowed to use negative values?
When using the padding property, are you allowed to use negative values?
How do you make a list that lists its items with squares?
How do you make a list that lists its items with squares?
How do you select an element with id 'demo'?
How do you select an element with id 'demo'?
How do you select elements with class name 'test'?
How do you select elements with class name 'test'?
How do you select all
elements inside a
element?
Signup and view all the answers
How do you select all
elements inside a
How do you group selectors?
How do you group selectors?
What is the default value of the position property?
What is the default value of the position property?
Study Notes
CSS Basics
- CSS stands for Cascading Style Sheets.
- Correct HTML for an external style sheet:
<link rel="stylesheet" type="text/css" href="style.css">
- External style sheets are referred to in the
<head>
section of an HTML document.
Internal and Inline Styles
- The
<style>
tag is used to define an internal style sheet. - Inline styles are defined using the
style
attribute directly within an HTML tag.
CSS Syntax
- Correct CSS syntax example:
body {color: black;}
- Comments in a CSS file:
/* This is a comment */
Color and Background
- The property used to change the background color:
background-color
. - To add a background color for all
<h1>
elements:h1 {background-color: #FFFFFF;}
Text Properties
- The CSS property for changing the text color:
color
. - The property controlling text size:
font-size
. - Making all
<p>
elements bold:p {font-weight: bold;}
Text Decoration and Capitalization
- Display hyperlinks without an underline:
a {text-decoration: none;}
- To capitalize each word in a text:
text-transform: capitalize;
Font Properties
- Font can be changed using
font-family
orfont
. - To make text bold:
font-weight: bold;
Borders and Margins
- Syntax for custom border widths:
border-width: 10px 1px 5px 20px;
- Change the left margin of an element:
margin-left
.
Padding and Lists
- Negative values are not allowed when using the padding property.
- To create a list with square items:
list-style-type: square;
Selecting Elements
- To select an element with id "demo":
#demo
. - To select elements with class name "test":
.test
. - Select all
<p>
elements inside a<div>
:div p
.
Grouping and Positioning
- Group selectors by separating them with a comma.
- The default value of the position property in CSS:
static
.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
Test your knowledge of CSS with this quiz! Covering topics such as the meaning of CSS, how to link external stylesheets, and more, this quiz is perfect for beginners looking to sharpen their web design skills.