Interview Question

What are the different types of CSS?

External, embedded, and inline styles differ by where their declarations are written.

💡 Concept ✅ Quick Revision 🎨 CSS

Answer

CSS can be supplied through external style sheets, style elements, or style attributes. • External style sheets are linked resources and are reusable across documents. • A style element places CSS rules inside an HTML document. • A style attribute applies declarations directly to one element.

💡 Simple Example

<link rel="stylesheet" href="styles.css"> <style>.note { color: navy; }</style> <p style="font-weight: 700">Important</p>

⚡ Quick Revision

External, embedded, and inline styles differ by where their declarations are written.