0% found this document useful (0 votes)
20 views2 pages

Grade11 CSS Basics

CSS, or Cascading Style Sheets, is used for styling HTML elements. It can be inserted into HTML through inline, internal, or external methods. Key CSS syntax includes selectors and properties, with common properties such as color, background-color, font-size, text-align, margin, and padding.

Uploaded by

aberayohanes27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views2 pages

Grade11 CSS Basics

CSS, or Cascading Style Sheets, is used for styling HTML elements. It can be inserted into HTML through inline, internal, or external methods. Key CSS syntax includes selectors and properties, with common properties such as color, background-color, font-size, text-align, margin, and padding.

Uploaded by

aberayohanes27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Grade 11 Web Design: Introduction to CSS

1. What is CSS?

CSS stands for Cascading Style Sheets. It is used to style and design HTML elements.

2. Three Ways to Insert CSS into HTML:

- Inline CSS: inside a tag using the "style" attribute

Example: <p style="color: red;">This is red text</p>

- Internal CSS: inside a <style> tag in the <head> section

Example:

<style>

p { color: blue; }

</style>

- External CSS: in a separate .css file, linked using <link>

Example:

<link rel="stylesheet" href="styles.css">

3. Basic CSS Syntax:

selector { property: value; }

Example: h1 { color: green; font-size: 20px; }

4. Common CSS Properties:

- color: sets text color

- background-color: sets background color

- font-size: sets size of the font


- text-align: aligns text (left, center, right)

- margin: space outside an element

- padding: space inside an element

You might also like