Docsity

CSS: The Cascading Style Sheets Language for Web Design, Study notes of Web Design and Development

Partial preview of the text

Download CSS: The Cascading Style Sheets Language for Web Design and more Study notes Web Design and Development in PDF only on Docsity!

Introduction to CSS part 1

Ms.EV

DEFINITION: CSS

  • CSS stands for CASCADING STYLE SHEET
  • Cascading Style Sheets (CSS) is a markup language responsible for how your web pages will look like. It controls the colors, fonts, and layouts of your website elements.
  • Simple design language intended to simplify the process of making web pages presentable.
  • CSS handles the look and feel part of a web page. Without CSS, your website will appear as a plain HTML page. Here’s how Twitter will look like if we disable its CSS:

Advantages of CSS

  • CSS saves time - You can write CSS once and then reuse the same sheet in multiple HTML pages. You can define a style for each HTML element and apply it to as many web pages as you want.
  • Pages load faster - If you are using CSS, you do not need to write HTML tag attributes every time. Just write one CSS rule of a tag and apply it to all the occurrences of that tag. So, less code means faster download times.
  • Easy maintenance - To make a global change, simply change the style, and all the elements in all the web pages will be updated automatically.

CSS RULE/SYNTAX

TYPES OF CSS

• INLINE STYLE SHEET

• INTERNAL/ EMBEDDED STYLE SHEET

• EXTERNAL STYLE SHEET

INLINE STYLES

  • When you style inside an HTML tag
  • Inline CSS is used to style a specific HTML element. For this CSS style, you’ll only need to add the style attribute to each HTML tag, without using selectors.
  • This CSS type is not really recommended, as each HTML tag needs to be styled individually. Managing your website may become too hard if you only use inline CSS.

INTERNAL STYLES

It requires you to add

Example:

Hostinger Tutorials

This is our paragraph.

body { background: url('bg2.jpg'); background-size: cover; font-family: sans-serif; color: white; }

to be cont..