bestwebdesign

Freelancign web design and Graphics design

Monday 13 November 2017

classes

HTML classes

Example

Using CSS to style all elements with the class name "city":



 <!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<style>
.city {
    background-color: tomato;
    color: white;
    padding: 10px;
}
</style>
</head>
<h2 class="city">London</h2>
<p>London is the capital of England.</p>

<h2 class="city">Paris</h2>
<p>Paris is the capital of France.</p>

<h2 class="city">Tokyo</h2>
<p>Tokyo is the capital of Japan.</p>


Share:

0 comments:

Post a Comment


Web Design Tutorial

Theme Support

Munere veritus fierent cu sed, congue altera mea te, ex clita eripuit evertitur duo. Legendos tractatos honestatis ad mel. Legendos tractatos honestatis ad mel. , click here →