Skip to content

Instantly share code, notes, and snippets.

View Esther-Hernandez's full-sized avatar

Esther Hernandez Esther-Hernandez

View GitHub Profile
<p>
While <i>HTML</i> defines the structure of a
Web page, <i>CSS</i> can tell the browser
what background color or font size to
use in a Web page.
</p>
h1 {
text-align:center;
}
p {
background-color: rgba(255, 0, 0, 0.5);
color: white;
text-align: justify;
}
<!DOCTYPE html>
<html>
<head>
<title>Web Page Title</title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<h1>Lorem ipsum</h1>
<p>Lorem ipsum dolor sit amet,
p {
background-color: rgb(0, 0, 255);
}
<!DOCTYPE html>
<html>
<head>
<title>Using Property "background-color"</title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<p>This is a paragraph.</p>
</body>
</html>
p {
color: rgba(255, 0, 0, 0.3);
}
<!DOCTYPE html>
<html>
<head>
<title>Using Property "color"</title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<p>This is a paragraph.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Using area Element</title>
</head>
<body>
<map name="image-map">
<area shape="circle" coords="150,150,150" href="here.html" alt="Click to go here">
</map>
<img usemap="#image-map" src="http://placehold.it/500x500" alt="pic">
body {
background-image:
radial-gradient(circle, pink, orange, red);
}
p {
font-weight: bold;
font-size: 35px;
color: black;
text-align: center;
<!DOCTYPE html>
<html>
<head>
<title>Property background-image</title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<div>
<p>CSS property: background-image</p>
</div>