![]() |
The |
Example:
HTML
<!DOCTYPE html>
<html>
<head>
<style>
.city {
background-color: tomato;
color: white;
border: 2px solid black;
margin: 20px;
padding: 20px;
}
</style>
</head>
<body>
<div class="city">
<h2>London</h2>
<p>London is the capital of England.</p>
</div>
</body>
</html>
Example:
HTML
<!DOCTYPE html>
<html>
<head>
<style>
.note {
font-size: 120%;
color: red;
}
</style>
</head>
<body>
<h1>My <span class="note">Important</span> Heading</h1>
<p>This is some <span class="note">important</span> text.</p>
</body>
</html>
What is HTML class Attribute | HTML class Attribute |
How to Use The class Attribute | HTML class Attribute |
How to use The Syntax For Class | HTML class Attribute |
How to create HTML Multiple Classes | HTML class Attribute |
How to create Different Elements Can Share Same Class | HTML class Attribute |
How to Use of The class Attribute in JavaScript | HTML class Attribute |
Basic Example of Using The class Attribute | HTML class Attribute |
Basic Example of Using The Span Attribute | HTML class Attribute |
Read Full: | HTML class Attribute |
Category: | Web Tutorial |
Sub Category: | HTML class Attribute |
Uploaded by: | Admin |
Views: | 70 |
Reffered: https://www.w3schools.com/html/tryit.asp?filename=tryhtml_classes_span