Build your first Lightning Web Component! Create a component that displays a greeting message.

Add a greeting property to the component class set to the exact string Hello, Trailblazer!, then render it in the template inside a <p> element with the class greeting. The paragraph must be the only <p> element in the template, and its class attribute must be exactly greeting.

Examples:

Rendered output: <p class="greeting">Hello, Trailblazer!</p> The tests check: - A <p> element with class "greeting" exists - Its text is exactly "Hello, Trailblazer!" - It is the only <p> element in the template
LWC

Preview

Press Run & Test to compile and preview your component.

Test results

Tests run automatically after each compile.

Wally can't hear you

Please sign in to access the AI Assistant

Sign In