$type=carousel$cols=3$cate=0$date=1

Using DIV tag in your Web Page

A DIV tag is a division of your web page. It can be the header area , the main content section or the footer at the bottom of your web p...

A DIV tag is a division of your web page. It can be the header area , the main content section or the footer at the bottom of your web page.  The content  section of your web  page can be defined by a separate  DIV. We use DIV tag  to make the content organized and more easily readable. 

I will create a div and with a paragraph tag inside the DIV. Let us also decorate the div by giving a class to it using a little CSS.

Let us see how to use the DIV tag with an example:
HTML
                 <html>
                  <body>

                  <div>
                    <p> Let us see how to use the DIV tag with an example:</p>
                    </div>

        <div class="orange">
        <p>An Orange color DIV tag. Fill up with your content here inside this div.</p>
        </div>  <!--We end the div here-->
       
        <div class="purple">
        <p>A Purple color DIV tag. Fill up with your content here inside this div.</p>
        </div> <!--We end the div here-->

                </body>

                </html>

CSS
       .orange {
        text-align:center;
        color: white;
        background-color: orange;
        width: 600px;
        height: 20px;
        padding: 20px;
        }

        .purple {
        text-align: center;  
        color: white;
        background-color: purple;
        width: 650px;
        height: 20px;
        padding: 20px;
        }


RESULT


An Orange color DIV tag. Fill up with your content here inside this div.

A Purple color DIV tag. Fill up with your content here inside this div.


END...

COMMENTS

Name

css,17,html,7,php,2,python,1,tech,18,
ltr
item
iWriteLess Tech Blog: Using DIV tag in your Web Page
Using DIV tag in your Web Page
iWriteLess Tech Blog
http://www.iwriteless.com/2015/12/using-div-tag-in-your-web-page.html
http://www.iwriteless.com/
http://www.iwriteless.com/
http://www.iwriteless.com/2015/12/using-div-tag-in-your-web-page.html
true
2724151228810149585
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share. STEP 2: Click the link you shared to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy