Difference between revisions of "Div"

From MyWiki
Jump to: navigation, search
Line 6: Line 6:
 
  </div>  
 
  </div>  
 
  <p>This is some text.</p>
 
  <p>This is some text.</p>
 +
 +
----
 +
<!DOCTYPE html>
 +
<html>
 +
<head>
 +
<style>
 +
div>p
 +
{
 +
background-color:yellow;
 +
}
 +
</style>
 +
</head>
 +
 +
<body>
 +
<h1>Welcome to My Homepage</h1>
 +
<div>
 +
<h2>My name is Donald</h2>
 +
<p>I live in Duckburg.</p>
 +
</div>
 +
 +
<div>
 +
<span><p>I will not be styled.</p></span>
 +
</div>
 +
 +
<p>My best friend is Mickey.</p>
 +
</body>
 +
</html>

Revision as of 20:04, 11 June 2014

This is some text.

This is a heading in a div element

This is some text in a div element.

This is some text.


<!DOCTYPE html> <html> <head> <style> div>p { background-color:yellow; } </style> </head>

<body>

Welcome to My Homepage

My name is Donald

I live in Duckburg.

I will not be styled.

My best friend is Mickey.

</body> </html>