WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML Classes


Classing Block Elements

The HTML class attribute makes it possible to define equal styles for "equal" <div> elements:

Mahata Gandhi

Mahata Gandhi born in 2 October 1869 Porbander,India.He was the leader of the Indian independence movement against British rule.

He was father of the nation called him and In south Africa who advocated for the civil right of Indian.India called him Bapu.

George Washington

George Washington born in 22 February 1732.He was the first President of the USA from 1789 to 1797.

He was the of Father of USA.

Example

<!DOCTYPE html>
<html>
<head>
<style>
div.leader {
    background-color:black;
    color:white;
    margin:20px;
    padding:20px;
}
</style>
</head>
<body>

<div class="leader">
<h2>Mahata Gandhi</h2>
<p>Mahata Gandhi was born in 2 October 1869 Porbander,India.He was the leader of the Indian independence movement against British rule. </p>
</div>

<div class="leader">
<h2>George Washington</h2>
<p>George Washington was born in 22 February 1732.He was the first President of the USA from 1789 to 1797 </p>
</div>

Try it Yourself »

Classing Inline Elements

The HTML class attribute also makes it possible to define equal styles for "equal" <span> elements:

Example

<!DOCTYPE html>
<html>
<head>
<style>
span.this{font-size:110%;color:blue;}
</style>
</head>
<body>

<h1>Never <span class="this">be the</span> same Heading</h1>
<p>we are learn <span class="this">important</span> text.</p>

</body>
</html>
Try it Yourself »


Welookups is optimized for learning.Copy right 2018 kumar aditya singh .
All Right Reserved and you agree to have read and accepted our term and condition.
All Rights Reserved.

welookups.com