Learn HTML
Lesson 1 - Overview Of The Web And HTML
Lesson 2 - HTML Tags And Elements
Lesson 3 - Images And Multimedia
Lesson 4 - Writing Your First HTML Page
Lesson 6 - CSS Selectors And Properties
Lesson 7 - Applying CSS To HTML
Lesson 8 - Box Model
Lesson 9 - Positioning And Layout
Lesson 10 - Flexbox
CSS syntax comprises selectors and declarations, which work together to style HTML elements effectively.
p { color: blue; font-size: 14px; }
In the example above:
p
is a selector targeting all <p>
(paragraph) elements on the webpage.{}
, color: blue;
sets the text color of paragraphs to blue, and font-size: 14px;
adjusts the font size to 14 pixels.Understanding selectors and declarations is fundamental to effectively styling webpages with CSS. We'll delve deeper into these concepts in our upcoming lesson.