Angular · Junior · Question 7 of 75

What does :host mean in a component's styles?

Explanation

:host { display: block; } styles the element that matches the selector. By default a custom element is display: inline, so components often set their display mode with :host.

Further reading

Problem with a question

Angular · Junior · question 7

Test yourself

Take the Angular · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz