Skip to content

Commit e0b0a44

Browse files
committed
feat: update task description to include HTML tags for paragraph and color properties; add solution code for CSS rule
1 parent e123e4b commit e0b0a44

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lessons/00-basic-selectors.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@
99
"id": "introduction-to-selectors",
1010
"title": "What is a CSS Selector?",
1111
"description": "A CSS selector is the first part of a CSS rule that tells the browser which HTML elements should receive the styles defined in the declaration block. Selectors are essentially patterns that match against elements in your HTML document. Understanding selectors is fundamental because they determine which elements your CSS rules will affect. The element or elements targeted by a selector are referred to as the 'subject of the selector.' When writing a CSS rule, you first specify the selector, followed by curly braces that contain the style declarations.<br/>For example, to change the text color of elements, you can use the <kbd>color</kbd> property within your declaration block.<br><br><pre>/* Element selector */\np {\n color: orangered;\n /* │ └─── Indicates the value of the expression\n\n └─────────── Indicates the property of the expression */\n}</pre>",
12-
"task": "Write a CSS rule using a type selector that targets all paragraph elements (p) in the document. Make the text blue by setting the color property to blue.",
12+
"task": "Write a CSS rule using a type selector that targets all paragraph elements <kbd>p</kbd> in the document. Make the text blue by setting the <kbd>color</kbd> property to <kbd>blue</kbd>.",
1313
"previewHTML": "<h1>Introduction to CSS Selectors</h1>\n<p>This paragraph should turn blue.</p>\n<div>This div element should remain unchanged.</div>\n<p>This second paragraph should also turn blue.</p>",
1414
"previewBaseCSS": "body { font-family: sans-serif; line-height: 1.5; padding: 20px; }",
1515
"sandboxCSS": "h1, p, div { padding: 8px; margin-bottom: 10px; border: 1px dashed #ccc; }",
1616
"codePrefix": "/* Write a type selector to target all paragraph elements */\n",
1717
"initialCode": "",
1818
"codeSuffix": "",
1919
"previewContainer": "preview-area",
20+
"solution": "p { color: blue }",
2021
"validations": [
2122
{
2223
"type": "regex",

0 commit comments

Comments
 (0)