Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1. color: Sets the color of the text. The external style sheet is generally used when
Example: <h1 style="color: you want to make changes on multiple pages. It
blue;">Heading</h1> is ideal for this condition because it facilitates
you to change the look of the entire website by
2. font size: Sets the size of the text. changing just one file.
Example: <p style="font-size: 16px;">This
is a paragraph.</p> It uses the <link> tag on every page and the
3. Background color: Sets the background <link> tag should be put inside the head section.
color of an element.
Example: <div style="background-color: <head>
yellow;">Content</div> <link rel="stylesheet" type="text/css" href="my
4. width: Sets the width of an element. style.css">
Example: <img src="image.jpg" </head>
style="width: 200px;"> must be saved with a .css extension. This file
should not contain HTML elements.
5. height: Sets the height of an element.
EXAMPLE OF EXTERNAL CSS
Example: <div style="height:
300px;">Content</div>
6. text-align: Aligns the text within an HTML FILE:
element.
Example: <p style="text-align: <!DOCTYPE>
center;">Centered text</p> <html>
7. padding: Sets the padding (space) inside
an element. <head>
Example: <div style="padding: <link rel="stylesheet" type="text/css" href="my
10px;">Content</div> style.css">
8. margin: Sets the margin (space) around </head>
an element. <body>
Example: <div style="margin: <div>Hello💕</div>.
20px;">Content</div>
9. border: Sets the border properties of an </body>
element.
Example: <div style="border: 1px solid CSS FILE:
black;">Content</div>
10. font-family: Sets the font family for the body{
text.
Example: <p style="font-family: Arial, sans- background-color: #128149;
serif;">This is a paragraph.</p> }
div{ padding:5px;
border: 2px solid gray; text-align: center;
border-radius: 10%; font-size:100px;
background:linear-gradient(to }
right,gray,white,gray,gray,white,gray,white,gray
,gray); </style>
padding:5px; </body>
}
Internal CSS
is applied in a group of HTML Elements.
<!DOCTYPE>
<html>
<head>
<style>
body{
background-color: #128149;
}
div{
border: 2px solid gray;
border-radius: 10%;
background:linear-gradient(to
right,gray,white,gray,gray,white,gray,white,gray
,gray);
height: 200px
width: 200;