×

Save Your Code

If you click the save button, your code will be saved, and you get an URL you can share with others.

By clicking the "Save" button you agree to our terms and conditions.

Report Error

×

Save to Google Drive

If you have a Google account, you can save this code to your Google Drive.

Google will ask you to confirm Google Drive access.

×

Open from Google Drive

If you have saved a file to Google Drive, you can open it here:

Result Size: 625 x 571
x
 
<!DOCTYPE html>
<html>
<head>
<style>
.cities {
  background-color: black;
  color: white;
  padding: 20px;
}
</style>
</head>
<body>
<h2>The class Attribute</h2>
<p>Use CSS to style an element with the class name "cities":</p>
<div class="cities">
  <h2>London</h2>
  <p>London is the capital of England. It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.</p>
  <p>Standing on the River Thames, London has been a major settlement for two millennia, its history going back to its founding by the Romans, who named it Londinium.</p>
</div> 
</body>
<!-- Mirrored from www.w3schools.com/html/tryit.asp?filename=tryhtml_classes_london by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 02:24:41 GMT -->
</html>
×

Report a Problem: