Welcome to my site!
\ndiff --git a/lessons/20-html-elements.json b/lessons/20-html-elements.json index 013da18..6522a93 100644 --- a/lessons/20-html-elements.json +++ b/lessons/20-html-elements.json @@ -17,6 +17,10 @@ "initialCode": "
This is a paragraph with an important word.
", "solution": "This is a paragraph with an important word.
", "previewContainer": "preview-area", + "concept": { + "explanation": "The browser's layout engine treats block and inline elements fundamentally differently. Block elements create a rectangular box that starts on a new line and expands to fill available width, stacking vertically like building blocks. Inline elements flow horizontally within text content, wrapping to new lines only when they run out of space—like words in a paragraph. This distinction controls document flow: use block for structure (sections, paragraphs) and inline for content emphasis (bold, links) without breaking the text flow.", + "diagram": "Block vs Inline Layout\n\nBlock elements (vertical stacking):\n┌─────────────────────────────┐\n│ Another block element │ ← New line\n└─────────────────────────────┘\n\nInline elements (horizontal flow):\n┌─────────────────────────────┐\n│ Text with link and │\n│ bold flows │ ← Wraps naturally\n│ like words in a sentence. │\n└─────────────────────────────┘\n\nKey differences:\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nBlock: New line, full width\nInline: Same line, auto width\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
+ },
"validations": [
{
"type": "element_exists",
@@ -41,6 +45,10 @@
"initialCode": "",
"solution": " Welcome to my site!My Website
\nSite Title
│ (branding, logo)\n│ │ (navigation)\n└─────────────────────────────┘\n┌─────────────────────────────┐\n│