CSS: Lesson 6 - What are DIVs?

Divs?  What are divs?  Think of divs as just generic tags.  We often use divs to create layouts by DIViding the page, which is how I believe it got its name, which we will do in one of your projects later.   For now lets just grasp the concept.  Our goal in this exercise is to
<html>
 <head>
 <title>Divs Hmmm?</title>


 <style type="text/css">

 .bigfont {
 font-size:200%;
 }

 #purple {
 color:purple;
 }

 .underline {
 text-decoration:underline;
 }

 .bold {
 font-weight:bold;
 }

 .redbox {
 background-color:red;
 width:200px;
 height:200px;
 }

 .yellowbox {
 background-color:yellow;
 width:600px;
 height:200px;
 }
 </style>

 </head>

 <body>

 <div class="redbox">

 <p class="bigfont">This a red box with some big font J <p>

 </div>

 <div class="yellowbox">

 <p id="green" class="large">This is a yellow box with some big font.</p>

 </div>
 <p>the css of three classes has been applied to this ->   <span class="underline bigfont  bold">I am underlined big and bold</span> in this
paragraph is underlined.</p>

 </body>

</html>

0 comments:

TUTORIALS

  • HTML
  • CSS
  • Javascript
  • JQuery
  • PHP
  • MySQL

Labels