Bird
0
0

What is the correct way to comment the metadata block in the style.css file of a WordPress theme?

easy📝 Conceptual Q2 of 15
Wordpress - Theme Structure and Basics
What is the correct way to comment the metadata block in the style.css file of a WordPress theme?
A// Metadata here
B<!-- Metadata here -->
C/* Metadata here */
D# Metadata here
Step-by-Step Solution
Solution:
  1. Step 1: Identify CSS comment syntax

    CSS files use the /* ... */ syntax for comments. This is how WordPress expects the metadata block to be enclosed in style.css.
  2. Step 2: Compare with other comment styles

    Other comment styles like //, , and # are not valid in CSS files and will cause errors or be ignored.
  3. Final Answer:

    /* Metadata here */ -> Option C
  4. Quick Check:

    CSS comment syntax = /* ... */ [OK]
Quick Trick: Use /* ... */ for CSS comments including metadata [OK]
Common Mistakes:
  • Using HTML comments in CSS
  • Using single-line comments like //
  • Using shell-style # comments

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Wordpress Quizzes