Tuesday, April 28, 2020

html div tag element

html div tag element

html div tag element is most useful tag in websites when we create a web page or website there are some tags that must use in website in these div tag is one tag that useful in web pages in web programming div is a division tag that separates one part of website from another part.

Html div tag element start with <div> tag and end with </div> tag.
About this i give an example from my short document.


<!DOCTYPE html>
<html>
<head>
<title>Html div tag</title>
<style type="text/css">
#div1{
background-color: green;
height: 100px;
width: 200px;
}
#div2{
background-color:blue;
height: 100px;
width: 200px;
}
#div3{
background-color:red;
height: 100px;
width: 200px;
}
</style>
</head>
<body>
<div id="div1">
</div>
<div id="div2">
</div>
<div id="div3">
</div>
</body>
</html>

when we put these codes the browser will give the result like this Image:↴

                                                                               ⇊⇊
   
               
html div element has two catogeries "id" and "class" we use in this coding "id" id is specification of an element.

For more detail you can watch my video on youtube  I clear html div tag element in this video.







No comments:

Post a Comment

css class

css class or html class: Class in html and css is a selector. We can define style rules based on the class attribute of the elements. Al...