Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Basic of CSS programming for frontend developer

Rating
-
Sold
-
Pages
73
Uploaded on
06-12-2025
Written in
2024/2025

In that notes we provide well defined theory and practice program in css written by teachers

Institution
Course

Content preview

What is CSS
CSS stands for Cascading Style Sheets. It is a style sheet language which is
used to describe the look and formatting of a document written in markup
language. It provides an additional feature to HTML. It is generally used with
HTML to change the style of web pages and user interfaces. It can also be
used with any kind of XML documents including plain XML, SVG and XUL.

CSS is used along with HTML and JavaScript in most websites to create user
interfaces for web applications and user interfaces for many mobile
applications.




What does CSS do
o You can add new looks to your old HTML documents.
o You can completely change the look of your website with only a few
changes in CSS code.




Why use CSS
These are the three major benefits of CSS:

1) Solves a big problem
Before CSS, tags like font, color, background style, element alignments,
border and size had to be repeated on every web page. This was a very long
process. For example: If you are developing a large website where fonts and
color information are added on every single page, it will be become a long
and expensive process. CSS was created to solve this problem. It was a W3C
recommendation.

Backward Skip 10sPlay VideoForward Skip 10s

2) Saves a lot of time
CSS style definitions are saved in external CSS files so it is possible to
change the entire website by changing just one file.

, 3) Provide more attributes
CSS provides more detailed attributes than plain HTML to define the look and
feel of the website.




CSS Syntax
A CSS rule set contains a selector and a declaration block.




Selector: Selector indicates the HTML element you want to style. It could be
any tag like <h1>, <title> etc.

Declaration Block: The declaration block can contain one or more
declarations separated by a semicolon. For the above example, there are
two declarations:

1. color: yellow;
2. font-size: 11 px;

Each declaration contains a property name and value, separated by a colon.

Property: A Property is a type of attribute of HTML element. It could be
color, border etc.

Value: Values are assigned to CSS properties. In the above example, value
"yellow" is assigned to color property.

1. Selector{Property1: value1; Property2: value2; ..........;}

,CSS Selector
CSS selectors are used to select the content you want to style. Selectors
are the part of CSS rule set. CSS selectors select HTML elements according to
its id, class, type, attribute etc.

There are several different types of selectors in CSS.

1) CSS Id Selector
The id selector selects the id attribute of an HTML element to select a
specific element. An id is always unique within the page so it is chosen to
select a single, unique element.

It is written with the hash character (#), followed by the id of the element.

<!DOCTYPE html>

<html>

<head>

<style>

#para1 {

text-align: center;

color: blue;

}

</style>

</head>

<body>

<p id="para1">Hello Javatpoint.com</p>

<p>This paragraph will not be affected.</p>

</body>

</html>

, Output:

Hello Javatpoint.com

This paragraph will not be affected.

3) CSS Class Selector
The class selector selects HTML elements with a specific class attribute. It is
used with a period character . (full stop symbol) followed by the class name.

<!DOCTYPE html>

<html>

<head>

<style>

.center {

text-align: center;

color: blue;

}

</style>

</head>

<body>

<h1 class="center">This heading is blue and center-aligned.</h1>

<p class="center">This paragraph is blue and center-aligned.</p>

</body>

</html>



Output:


This heading is blue and center-aligned.

Written for

Institution
Course

Document information

Uploaded on
December 6, 2025
Number of pages
73
Written in
2024/2025
Type
Class notes
Professor(s)
Shraddha jadhav
Contains
All classes

Subjects

$9.29
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
pranavkamble1

Also available in package deal

Get to know the seller

Seller avatar
pranavkamble1 Rajarshi shahu collage Latur
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
5 months
Number of followers
0
Documents
2
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions