HTML and CSS Certification Practice Test 2026 - Free HTML and CSS Practice Questions and Study Guide

Question: 1 / 400

Which type selector should you use to apply a style to all elements in a document?

all

*

The correct choice for applying a style to all elements in a document is the asterisk (*) selector. This selector is commonly referred to as the universal selector in CSS.

When you use the asterisk selector in your CSS rule, it targets every single element within the specified context of your document. For example, if you want to set a default font size or color for all elements, you would write your CSS like this:

```css

* {

font-size: 16px;

color: black;

}

```

This approach is particularly useful for setting baseline styles across an entire webpage without needing to specify each element individually.

The other options do not serve the same function: "all" is not a recognized selector in CSS, "every" does not exist as a selector either, and while "universal" refers to the concept, it is not the selector name. Thus, the asterisk (*) is the correct and practical choice for selecting all elements.

Get further explanation with Examzify DeepDiveBeta

every

universal

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy