Thursday, December 31, 2020

div tag in html | html basic | purpose of Div tag in html | basic tags and syntax of html Document

purpose of div tag in HTML


                Div Tag In HTML

Definition and   Usage 

The <div> tag is define as decision of HTML documents 
The <div> tag is  usually used as container For HTML elements 
which can be styled later by using Css 
The <div> tag is easily styled by using class and Id 
All sort of content is write in between <div> tag

Code For <div > tag is 

<!DOCTYPE html>
    <meta charset='utf-8'>
    <meta http-equiv='X-UA-Compatible' content='IE=edge'>
    <title>Html Structure</title>
    <meta name='viewport' content='width=device-width, initial-scale=1'>
    <link rel='stylesheet' type='text/css' media='screen' href='main.css'>
    <script src='main.js'></script>
   <div class="mydiv">
       this is first dive of HTML document
   <div class="div1">
       this is second div of HTMl document

Out of this will be shown on the browser

this tag can be styled by using CSS we will discuss css very soon

if you like this blog please share and Comment


Post a Comment