css my favourite ict lesson by federico boschi cascading style sheets
TRANSCRIPT
![Page 1: CSS My favourite ICT lesson By Federico Boschi Cascading Style Sheets](https://reader038.vdocument.in/reader038/viewer/2022110210/56649e7e5503460f94b8111a/html5/thumbnails/1.jpg)
CSS
My favourite ICT lessonBy Federico Boschi
Cascading Style Sheets
![Page 2: CSS My favourite ICT lesson By Federico Boschi Cascading Style Sheets](https://reader038.vdocument.in/reader038/viewer/2022110210/56649e7e5503460f94b8111a/html5/thumbnails/2.jpg)
WHAT IS IT?
CSS is a language that defines layout of HTML documents (web pages).
CSS controls the visual aspect of the web pages, such as:
• The position and the style of HTML elements;
• Backgrounds;
• Colours and images;
• Text styles;
• Tag styles.
CSS
![Page 3: CSS My favourite ICT lesson By Federico Boschi Cascading Style Sheets](https://reader038.vdocument.in/reader038/viewer/2022110210/56649e7e5503460f94b8111a/html5/thumbnails/3.jpg)
IMPORT IT IN A HTML PAGE
There are three modes to import a CSS in a html page:
• Inline; <tag style=‘property’>
• Built-in (into the head); <style type=‘text/css’> styles </style>
• External (into the head). <link href=‘file.css’ rel=‘stylesheet’ type=‘text/css’ media=‘screen’ />
![Page 4: CSS My favourite ICT lesson By Federico Boschi Cascading Style Sheets](https://reader038.vdocument.in/reader038/viewer/2022110210/56649e7e5503460f94b8111a/html5/thumbnails/4.jpg)
BASIC STANDARD
In a CSS code, to define the styles of the tags, we need to write:
tag {
properly: valore;
…
}
For example:
p {
color: red;
text-align: justify;
![Page 5: CSS My favourite ICT lesson By Federico Boschi Cascading Style Sheets](https://reader038.vdocument.in/reader038/viewer/2022110210/56649e7e5503460f94b8111a/html5/thumbnails/5.jpg)
THE COLOR
The properly ‘color’ allows you to assign a color to a tag. For example:
h1 {
color: purple;
}
or with the hexadecimal code:
h1 {
color: #800080;
}
![Page 6: CSS My favourite ICT lesson By Federico Boschi Cascading Style Sheets](https://reader038.vdocument.in/reader038/viewer/2022110210/56649e7e5503460f94b8111a/html5/thumbnails/6.jpg)
THE BACKGROUND
To assign a background color to a tag, we use the properly ‘background-color’:
body {
background-color: yellow;
}
Instead to insert a picture as background:
body {
background-image: url(file.jpg);
}
![Page 7: CSS My favourite ICT lesson By Federico Boschi Cascading Style Sheets](https://reader038.vdocument.in/reader038/viewer/2022110210/56649e7e5503460f94b8111a/html5/thumbnails/7.jpg)
FORMATTING TEXT
To formatting the text there are a lot of properly:
• font-family: Garamond; defines the type of font
• font-size: 1px; defines the size of the text
• font-style: italic; defines the style of the text (italic or normal)
• font-weight: bold; defines the thickness of the text (bold or normal)
• text-align: justify; defines the alignment of the text (justify or center or left or right)
• text-decoration: underline; defines the line of the text (underline or overline or none)
![Page 8: CSS My favourite ICT lesson By Federico Boschi Cascading Style Sheets](https://reader038.vdocument.in/reader038/viewer/2022110210/56649e7e5503460f94b8111a/html5/thumbnails/8.jpg)
POSITION AND SIZE OF OBJECTS
To define the position of a object we can use some properly:
• margin-left: 5px;
• margin-right: 5px;
• margin-top: 5px;
• margin-bottom: 5px;
Instead to define the size of a object:
• width: 70px;
• height: 40px;
![Page 9: CSS My favourite ICT lesson By Federico Boschi Cascading Style Sheets](https://reader038.vdocument.in/reader038/viewer/2022110210/56649e7e5503460f94b8111a/html5/thumbnails/9.jpg)
ENDThank for your
interest