Loading

Quipoin Menu

Learn • Practice • Grow

css / CSS Syntax
interview

Q1. What is the basic syntax of CSS?
CSS syntax consists of a selector followed by declaration blocks: selector { property: value; }. Multiple declarations are separated by semicolons.

Q2. What is a CSS rule?
A CSS rule is a combination of a selector and one or more declarations that define how selected elements should be styled.

Q3. What is the difference between a selector and a declaration?
A selector targets HTML elements, while a declaration (property:value pair) defines the styling applied to those elements.

Q4. How do you write comments in CSS?
CSS comments are written between /* and */. They are ignored by browsers and used for code documentation.

Q5. What is the purpose of semicolons in CSS?
Semicolons separate multiple declarations within a rule. The last declaration can omit the semicolon, but it's good practice to include it.