3-Front End Development (CSS)
3-Front End Development (CSS)
(CSS)
Example Code
<div>
<h1>Desired Technologies</h1>
</div>
What is CSS?
CSS stands for Cascading Style Sheets
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 style sheets are stored in CSS files
Example:
body {
background-color: lightblue;
}
h1 {
color: white;
text-align: center;
}
p{
font-family: verdana;
font-size: 20px;
}
CSS Borders
The CSS border properties allow you to specify the style, width, and color of
an element's border.
Example:
p{
border: 2px solid red;
border-radius: 5px;
}
CSS
Css have 3 types are as follow:
Inline
Outline (Internal)
External
<div class="city">
<h2>London</h2>
<p>London is the capital of England.</p>
</div>
</body>
CSS Id
The id attribute is used to point to a specific style declaration in a style sheet.
It is also used by JavaScript to access and manipulate the element with the
specific id.
Example:
<!DOCTYPE html>
<html>
<head>
<style>
#myHeader {
background-color: lightblue;
color: black;
padding: 40px;
text-align: center;
}
</style>
</head>
<body>
</body>
</html>
CSS Selectors
The id selector uses the id attribute of an HTML element to select a
specific element.
The id of an element is unique within a page, so the id selector is used to
select one unique element!
To select an element with a specific id, write a hash (#) character,
followed by the id of the element.
Example:
h1 {
text-align: center;
color: red;
}
h2 {
text-align: center;
color: red;
}
p{
text-align: center;
color: red;
}