How Well Do You Know CSS?

2019-03-19 20:33:05
How Well Do You Know CSS?

CSS is a language describing the presentation of a web document. The majority of Interner pages are arranged using CSS. The quiz covers the important sections of CSS without the knowledge of which it will be hard for a developer to work professionally. Are you ready? Let's go!

Which of the following values cannot be a value for font-size?

Font size should have a measurement unit or should be from the set of constants: xx-small, x-small, small, medium, large, x-large, xx-large


2 mm



What line defines the image for background and repeats it vertically?

background: url(images/back.png) repeat-y;

background: url(images/back.png) repeat-x;

background-image: url(images/back.png) repeat-y;

background: images/back.png; repeat-y;

What property should be added to the img tag to get a shadow inside a picture?

box-shadow: 0 0 5px #000;

img-shadow: inset 0 0 5px #000;

img-shadow: inset 5px #000;

box-shadow: inset 0 0 5px #000;

What value can border-style not have?





A developer has a task: to place text in a box 100px х 150px. The box should indent 10 cm from the page borders above and 5 from the left, and text from box borders – 5 pixels above, 15 from the left and right and 10 from below. How do you do it?

padding is a spacing of the box content from its edge, and margin is a distance from one box to the other or to page borders

How do you add comments to a CSS file?

// Comment

/* Comment */

*** Comment ***

What will the size of text in the tag be if a style from the code below relates to the document?

em is a relative value, which allows prescribing divisible values of size from the base one. Thus, the value from body will be doubled: 14*2=28pt





How do you define a tag, which will describe a style class for the div element?

Classes are defined using # (#class { }), and ID Selectors - through the period (.id { })





How do you link a css stylesheet to a html file?

How do you add a style for printing?

@media print { }

.print { }

print { }

How do you add color to font?

font-color: #FF0000;

font-color: red;

color: red;

font: #FF0000;

To what selector should the margin property be assigned to change indents on the page?





For what is the plus symbol between selectors used (for example, P + B { /* style */ })?

In this example, the style will be applied to the b tag, which will be after the p tag in html code.

To merge styles

To manage the style of adjacent elements

To specify general rules of style

The plus symbol is not used

How do you create a separate style for links to Runet domains?

a[href$=".ru"] { /* style */ } { /* style */ }

if (href="*.ru"} a { /* style */ }

.ru { /* style */ }

What pseudo class is used to describe a style, which is activated when the cursor is within the element, but without clicking on this element?





Junior developer

It seems you've only started to learn CSS! Don't forget to combine studying of theory with practice and you'll definitely succeed. Good luck! Share the quiz with friends and check their knowledge of CSS!

Middle developer

You're not bad at CSS, you can properly create different styles for pages, but there are still some gaps in knowledge. We hope this quiz helped you to reveal them! Learn new subjects and train on problems, and you'll definitely succeed!  Share the quiz with friends and check their knowledge of CSS!

Senior developer

You're a real crackerjack, you can create unusual styles and perfectly arrange pages no matter how complex customer's requirements are. Congrats! Make sure to sharpen your skills since the knowledge of CSS is very important on the way of studying web development. Share the quiz with friends and check their knowledge of CSS!