0% found this document useful (0 votes)
5 views

What is CSS

CSS, or Cascading Style Sheets, is a language used to describe the presentation of HTML elements, including aspects like color, layout, and size. There are three types of CSS: Inline CSS, which applies styles to individual elements; Internal/Embedded CSS, which is used for single-page websites and is placed in the <head> section; and External CSS, which stores styles in a separate .css file linked to the HTML document. Each type has its use cases and implications for code organization.

Uploaded by

deena
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)
5 views

What is CSS

CSS, or Cascading Style Sheets, is a language used to describe the presentation of HTML elements, including aspects like color, layout, and size. There are three types of CSS: Inline CSS, which applies styles to individual elements; Internal/Embedded CSS, which is used for single-page websites and is placed in the <head> section; and External CSS, which stores styles in a separate .css file linked to the HTML document. Each type has its use cases and implications for code organization.

Uploaded by

deena
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
You are on page 1/ 4

What is CSS? Explain different types of CSS?

CSS stands for Cascading Style Sheet. It describes Html elements to be


displayed at which part of the page. And how to appear like color, design,
layout, size, border, and margin, etc.

 CSS describes how HTML elements are to be displayed on screen, paper,


or in other media
 CSS saves a lot of work. It can control the layout of multiple web pages
all at once
 External stylesheets are stored in CSS files

There are 3 types of CSS: Inline CSS, Internal/ Embedded CSS,


and External CSS.

Inline CSS

Inline CSS allows you to apply a unique style to one HTML


element at a time.

Using style attribute with any CSS properties defined within the element you
can assign a specific HTML element.

Syntax:

<htmltag style="cssproperty1:value; cssproperty2:value;"> </htmltag>


Inline CSS is not recommended as it may lead to messy code

<p style="color: Gray;">Hello World</p>

Internal/ Embedded CSS


The internal CSS styling is used for applying properties to individual pages by
wrapping all styles in the <style> element.

This is placed in the <head> section of HTML documents.

Syntax:

This is used for single-page websites or when we cannot create external


stylesheets for our project.
External CSS

External CSS is used to upload all styling properties and values to a separate
.css file.

Then, we have to link the CSS document to our HTML file using the link tag
in the HTML file.

Syntax:

The. .css file cannot contain HTML tags.


File: custom.css

You might also like