CSS Colors and Fonts Quiz

In this quiz, we will explore CSS Colors and Fonts, focusing on how to apply colors, gradients, and text styles to web elements. Additionally, we’ll cover how to work with different font families, font sizes, and text alignment to enhance the visual appeal and readability of a webpage.

Last Updated :
Discuss
Comments

Question 1

Which CSS property is used to set the background color of an element?

  • color

  • background-color

  • border-color


  • text-color

Question 2

What is the correct way to specify the color red using hexadecimal notation?

  • #FF0000

  • rgb(255, 0, 0)

  • red

  • #F00

Question 3

What does the a in rgba stand for?

  • Alpha (transparency)

  • Angle

  • Array

  • Additive

Question 4

Which of the following is a valid CSS color keyword?

  • #blue

  • red

  • rgb(255, 255, 255)

  • #FFFFFFF

Question 5

What does the following CSS code create: background: linear-gradient(to right, red, blue);?

  • A radial gradient from red to blue

  • A solid background of blue

  • A horizontal gradient from red to blue

  • A vertical gradient from red to blue

Question 6

Which CSS property is used to set the font of an element?

  • font-style

  • font-family

  • font-weight

  • text-align

Question 7

What is the correct unit for setting the font size in CSS?

  • pt

  • pxe

  • em

  • All of the above

Question 8

What does the text-transform: uppercase; property do in CSS?

  • Makes the text lowercase


  • Makes the text uppercase

  • Underlines the text

  • Capitalizes the first letter of each word

Question 9

What value should you use for bold text in CSS?

  • font-weight: normal;

  • font-weight: bold;

  • font-weight: 500;

  • font-weight: 0;

Question 10

How can you import a Google Web Font in your CSS file?

  • @import url('https://fonts.googleapis.com/css2?family=Roboto');

  • font-family: 'Roboto', sans-serif;

  • link href='https://fonts.googleapis.com/css2?family=Roboto'

  • font-url('https://fonts.googleapis.com/css2?family=Roboto')

Tags:

There are 10 questions to complete.

Take a part in the ongoing discussion