Professional Documents
Culture Documents
Week 4 - Webapps
Week 4 - Webapps
Week 4
WEB APPLICATIONS DEVELOPMENT - CIT
Learning Outcomes
1. Demonstrate using CSS classes and IDs.
2. Demonstrate importing Google fonts and use it in the webpage.
3. Demonstrate more CSS properties.
3
SYSTEMS PLUS COMPUTER COLLEGE - CALOOCAN
Using CSS classes and ID
selectors.
WEB APPLICATIONS DEVELOPMENT - CIT
CSS id selector
- 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.
#para1 {
text-align: center;
color: red;
}
5
SYSTEMS PLUS COMPUTER COLLEGE - CALOOCAN
WEB APPLICATIONS DEVELOPMENT - CIT
.right {
text-align: right;
color: red;
}
6
SYSTEMS PLUS COMPUTER COLLEGE - CALOOCAN
Importing Google Fonts
WEB APPLICATIONS DEVELOPMENT - CIT
Google Fonts
- If you do not want to use any of the standard fonts in HTML, you can
use Google Fonts.
<head>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Sofia">
<style>
body {
font-family: "Sofia", sans-serif;
}
</style>
</head>
8
SYSTEMS PLUS COMPUTER COLLEGE - CALOOCAN
More CSS Properties
WEB APPLICATIONS DEVELOPMENT - CIT
CSS Display
The display property is the most important CSS property for controlling
layout.
p{
display: block;
}
p{
display: none;
}
10
SYSTEMS PLUS COMPUTER COLLEGE - CALOOCAN
WEB APPLICATIONS DEVELOPMENT - CIT
CSS Lists
There are different types of list item markers or it can set it to none.
- circle
- square
- upper-roman
- lower-alpha
ul {
list-style-type: circle;
}
11
SYSTEMS PLUS COMPUTER COLLEGE - CALOOCAN
WEB APPLICATIONS DEVELOPMENT - CIT
CSS Opacity/Transparency
- The opacity property specifies the opacity/transparency of an element.
img {
opacity: 0.5;
}
12
SYSTEMS PLUS COMPUTER COLLEGE - CALOOCAN