SALESFORCE-PD1 User Interface Practice Question
Which TWO configuration files or metadata elements are required when creating a Lightning Web Component? Choose 2 answers.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
A JavaScript file (.js)
Every LWC requires an HTML template file and a metadata configuration XML file.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
A CSS stylesheet (.css)
Why it's wrong here
CSS files are optional if default styling is sufficient.
- ✓
A JavaScript file (.js)
Why this is correct
Defines component logic and class.
- ✗
An Apex controller class
Why it's wrong here
Apex controllers are optional for LWCs.
- ✓
A metadata configuration file (.js-meta.xml)
Why this is correct
Defines component targets and metadata.
- ✗
An Aura dependency bundle (.auradoc)
Why it's wrong here
Not required for LWC.
About these practice questions
Courseiva writes every SALESFORCE-PD1 question from scratch — 493 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed August 2026 · checked against the official Salesforce exam blueprint
This SALESFORCE-PD1 practice question is part of Courseiva's free Salesforce certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SALESFORCE-PD1 exam.