top of page

CSS: Cascading Style Sheets

Cascading Style Sheets, known as CSS is a stylesheet programming language. CSS is used for the determine of layout and display of the webpage elements; it determines the background color, style and size of the written document. Without CSS, the webpages on the internet would not be as engaging as it supposed to be. Here is an example that I learned on Khan Academy:

<!DOCTYPE html>

<html>

<head>

<meta charset= "utf-8">

<title>Cuba: Travel webpage</title>

<style>

h1 {

color:rgb(40, 113, 201);

}

h2 {

color:rgb(40, 113, 201);

}

{

color:rgb(0, 0, 0);

}

body {

background-color: cyan;

}

#Cuba-info {

background-color: cyan;

}

</style>

</head>

​

<h1><em>Travel to....Cuba</em></h1>

​

<p id="Cuba-info"> This year, President Obama wanted to normalize relations with Cuban leader Raul Castro; In over 50 years, the U.S and Cuba relaxed tensions hoping that it will support the economy of the Communist island nation.</p>

<img src= "https://upload.wikimedia.org/wikipedia/commons/b/bd/Flag_of_Cuba.svg" alt="flag-of-cuba" width="500">.

</html>

 

h1 and h2 codes for heading text and color:rgb( ); determines the color scheme of the title; body codes for the background color of the webpage the same with the hashtag seen above coloring the text body. If the programmer wishes to place images on the webpage they are creating, the link to the image from the internet is inserted inside <img src="">.

​

URL (Sources):

​

https://www.khanacademy.org/

bottom of page