Exercise A — Selector Playground

Write your CSS in css/styles.css to solve the tasks.

Introduction

Different selectors

Element

Lorem ipsum, dolor sit amet consectetur adipisicing elit. Facere a unde voluptate ipsam illo vel neque ipsa laborum accusamus dolorum, aliquid quibusdam reprehenderit molestias cupiditate suscipit reiciendis incidunt, hic ullam.

Class

Lorem ipsum dolor sit amet, consectetur adipisicing elit. In neque aliquam modi magnam quo impedit earum unde a odit quis. Nihil in numquam exercitationem est blanditiis sed earum perspiciatis laboriosam.

Id selector

Lorem ipsum dolor sit amet consectetur adipisicing elit. Cum voluptatem nemo rerum sit veniam rem amet dolorum magni facere excepturi atque a accusantium optio officia, iste vel obcaecati molestiae labore.

Specific selectors

Select menu items and mark them blue

But not the one below:

or the one below here:

Select first child

Me Ipsum dolor sit.

and me veniam molestiae dignissimos.

but not me and not me quidem recusandae doloremque asperiores ullam dignissimos laboriosam quos.

Select first element after h3 and mark lightpink

Link directly after H2 (for task 3)

But not me

Select third element of special list and mark orange

Pseudo-elements & classes


CSS pseudo-elements let you style parts of an element, such as the first letter or first line, or add extra cosmetic content before/after an element.

“First line should look different with ::first-line.” The rest of this blockquote can keep normal styling so the difference is clear.

Select some text on this page to see your ::selection style in action.