Angular · Junior · Question 7 of 75
What does :host mean in a component's styles?
- ✓Correct answer: The component's own host element (for example
<app-user-card>) - 2The
<html>element of the page - 3The parent component's host element
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.