101.school
CoursesAbout
Search...⌘K
Generate a course with AI...

    Introduction to HTML

    Receive aemail containing the next unit.
    • Introduction to Web Development and HTML Basics
      • 1.1Understanding Web Development
      • 1.2Overview of HTML
      • 1.3Basic HTML Syntax and Tags
      • 1.4HTML Elements
    • HTML Advanced Level
      • 2.1Lists, Tables, and Forms in HTML
      • 2.2HTML5 Elements
      • 2.3HTML Semantics
      • 2.4HTML Validation
    • Introduction to CSS
      • 3.1Understanding the CSS Syntax
      • 3.2CSS Selectors, Properties, and Values
      • 3.3CSS Box Model and Layout
    • CSS Advanced Level
      • 4.1CSS Positioning and Display
      • 4.2CSS Animations and Transforms
      • 4.3Responsive Design with CSS

    Introduction to CSS

    Understanding the CSS Syntax

    family of markup languages for displaying information viewable in a web browser

    Family of markup languages for displaying information viewable in a web browser.

    Cascading Style Sheets, commonly known as CSS, is a stylesheet language used to describe the look and formatting of a document written in HTML. CSS is one of the cornerstones of the web, enabling developers to create visually engaging and responsive websites. This article will provide an overview of the basic CSS syntax and how it works with HTML.

    Introduction to CSS

    CSS stands for Cascading Style Sheets. It is a language used to detail how a webpage should look and feel. CSS handles the visual side of a webpage, including layout, colors, fonts, and animations. It allows developers to control and apply consistent styling across multiple pages of a website.

    How CSS Works with HTML

    CSS works hand in hand with HTML. While HTML provides the structure of a webpage, CSS styles it. CSS rules target HTML elements, applying styles to them. These rules can be applied inline (directly within an HTML element), internally (within the <style> tags in the <head> of an HTML document), or externally (in a separate .css file linked to the HTML document).

    Basic CSS Syntax

    A CSS rule-set consists of a selector and a declaration block. The selector points to the HTML element you want to style. The declaration block contains one or more declarations separated by semicolons. Each declaration includes a CSS property name and a value, separated by a colon.

    Here's an example of a CSS rule:

    p { color: red; font-size: 16px; }

    In this example, p is the selector, and color: red; and font-size: 16px; are declarations. The property color is set to red, and the property font-size is set to 16px. This rule will apply the color red and a font size of 16 pixels to all paragraph (<p>) elements in the HTML document.

    Understanding the CSS syntax is the first step towards mastering CSS. In the next units, we will delve deeper into CSS selectors, properties, and values, and explore the CSS box model and layout techniques.

    Test me
    Practical exercise
    Further reading

    My dude, any questions for me?

    Sign in to chat
    Next up: CSS Selectors, Properties, and Values