From the course: CSS Fundamentals: Unlock the Power of Web Styling
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
What is basic CSS lexicon? - CSS Tutorial
From the course: CSS Fundamentals: Unlock the Power of Web Styling
What is basic CSS lexicon?
- [Instructor] Like any programming language, CSS has its own syntax or set of formatting rules to use. Thankfully it's pretty minimal. So it's not too difficult to learn. The most basic description of the syntax is that it includes a selector and a declaration block. The selector points to the element that you want to style. And in this case, it's the HTML paragraph element represented by P. And the declaration block, which is enclosed in these curly braces and can contain one or more declarations. These declarations are simply the formatting instructions. So here, we've got a couple of declarations or rules, one telling the browser which font to use, and another setting the font size. The rules themselves are made up of two parts, the property and the value. These are separated by colons, and there's a semicolon to tell the browser to stop evaluating and move on to the next role. That's really the basics of CSS syntax.…
Contents
-
-
-
What is CSS?3m 52s
-
(Locked)
What are default browser styles?2m 41s
-
(Locked)
What is basic CSS lexicon?3m 22s
-
(Locked)
What are basic selector types?4m 3s
-
(Locked)
What are CSS combinators?2m 18s
-
(Locked)
How does CSS work with HTML?4m 40s
-
(Locked)
What options are available to write your styles?2m 44s
-
(Locked)
How do browsers render styles?3m 53s
-
-
-
-
-
-