Difference between revisions of "Div"
From MyWiki
(Created page with " <!DOCTYPE html> <html> <body> <p>This is some text.</p> <div style="color:#0000FF"> <h3>This is a heading in a div element</h3> <p>This is some text in a div element...") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | ||
− | + | ||
− | + | ||
<p>This is some text.</p> | <p>This is some text.</p> | ||
<div style="color:#0000FF"> | <div style="color:#0000FF"> | ||
Line 8: | Line 6: | ||
</div> | </div> | ||
<p>This is some text.</p> | <p>This is some text.</p> | ||
− | + | ||
− | </html> | + | ---- |
+ | <!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> | ||
+ | |||
+ | ---- | ||
+ | <!DOCTYPE html> | ||
+ | <html> | ||
+ | <body> | ||
+ | |||
+ | <div id="contaer" style="width:500px"> | ||
+ | |||
+ | <div id="header" style="background-color:#FFA500;"> | ||
+ | <h1 style="margin-bottom:0;">Main Title of Web Page</h1></div> | ||
+ | |||
+ | <div id="menu" style="background-color:#FFD700;height:200px;width:100px;float:left;"> | ||
+ | <b>Menu</b><br> | ||
+ | HTML<br> | ||
+ | CSS<br> | ||
+ | JavaScript</div> | ||
+ | |||
+ | <div id="content" style="background-color:#EEEEEE;height:200px;width:400px;float:left;"> | ||
+ | Content goes here</div> | ||
+ | |||
+ | <div id="footer" style="background-color:#FFA500;clear:both;text-align:center;"> | ||
+ | Copyright © W3Schools.com</div> | ||
+ | |||
+ | </div> | ||
+ | |||
+ | </body> | ||
+ | </html> |
Latest revision as of 20:10, 11 June 2014
This is some text.
Contents
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>
<!DOCTYPE html> <html> <body>
Main Title of Web Page
Content goes here
</body> </html>