XHTML and CSS Tutorial - 28 - Style More Than One Elements & Span!

<!DOCTYPE html PUBLIC” -//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml/DTD/xhtmll-transitional.dtd>

<html>

<head>

<style type ="text/css">
H1, p {color:red;}
</style>

</head>
This is normal text
<h1>This is header one</h1>
<p>This is a paragraph</p>

<body>
</body>

</html>

!DOCTYPE html PUBLIC” -//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml/DTD/xhtmll-transitional.dtd>

<html>

<head>

<style type ="text/css">
Span {font-weight:bold; color : green;}
</style>

</head>

<body>

<p> This is my paragaraph and <span> I love video games </span> and it is Dota 2 </p>
</body>

</html>

Comments