ExamGecko
Question list
Search
Search

Question 188 - Certified B2B Commerce Developer discussion

Report
Export

Which HTML element can be used as a root tag for a Lightning Web Component's HTML file?

A.
<body>
Answers
A.
<body>
B.
<article>
Answers
B.
<article>
C.
<html>
Answers
C.
<html>
D.
<template>
Answers
D.
<template>
Suggested answer: D

Explanation:

In Lightning Web Components (LWC), the root tag for the component's HTML file must be <template>. This tag defines the markup structure for the component and is essential for the LWC framework to correctly render the component in the Salesforce Lightning Experience. The <template> tag is unique to LWC and is not interchangeable with standard HTML tags like <body>, , or <html>. For more information, see the Salesforce LWC documentation: Salesforce LWC HTML Templates Documentation.

asked 23/09/2024
Mohammad Wahid
46 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first