Introduction to CSS Syntax

Contents

keyboard_tab
CSS Syntax
Introduction to CSS Syntax
Overview
Difficulty
Beginner
Duration
2m
Students
39
Ratings
5/5
starstarstarstarstar
Description

This practical course offers a brief introduction to CSS Syntax. CSS uses a selector, a property, and the property's value to apply CSS.

Learning Objectives

  • Learn about the CSS Selector
  • Learn about the CSS Declaration Structure
  • Learn about the CSS Property
  • Learn about the CSS Property Value

Intended Audience

This course is intended for anyone who wants to learn about CSS.

Prerequisites

Anyone with an interest in CSS in general.

Transcript

Introduction to CSS Syntax. On the screen, I have CSS syntax and I'm gonna explain what is each portion of its structure. It begins with the selector and the CSS selector is the element or elements you wish to target. In this example, I'm targeting all paragraphs. The curly brackets are the beginning and the end of the declaration block and inside of the declaration block is where the CSS declarations are located at. There can be singular or multiple declarations. The declaration begins with the CSS property that will be modified. In this case, it is the font size. The colon after the property is the separator, to the right of the colon, is where the CSS property value will be set. In this case, 26 pixels.

After the CSS property value, the declaration is terminated with a semicolon. Now, in this example, I only have one declaration but multiple declarations could be written within the declaration block. Each declaration must follow the same pattern including the termination of each statement with a semicolon. It is considered a best practice to place each CSS declaration on its own line making it easier for yourself or others to read. And that's it, thanks for watching at Cloud Academy.

About the Author
Avatar
Farish Kashefinejad
Full-Stack Development Content Creator
Students
1909
Labs
16
Courses
39
Learning Paths
4

Farish has worked in the EdTech industry for over six years. He is passionate about teaching valuable coding skills to help individuals and enterprises succeed.

Previously, Farish worked at 2U Inc in two concurrent roles. Farish worked as an adjunct instructor for 2U’s full-stack boot camps at UCLA and UCR. Farish also worked as a curriculum engineer for multiple full-stack boot camp programs. As a curriculum engineer, Farish’s role was to create activities, projects, and lesson plans taught in the boot camps used by over 50 University partners. Along with these duties, Farish also created nearly 80 videos for the full-stack blended online program.

Before 2U, Farish worked at Codecademy for over four years, both as a content creator and part of the curriculum experience team.

Farish is an avid powerlifter, sushi lover, and occasional Funko collector.

Covered Topics