html css

HTML CSS Relationship 

what is html css?


Css: Cascading Style Sheets  Provide style and make structure of an website or web page; HTML (Hyper text markup  Language) uses for Write document Script And Both HTML CSS Make An Front Web page.


Css


 In the way we can write html css by uses three method; below you can see how to write html css. 


    1.Internal css 
      2.External css

      3.inline css


      1.Internal Css:Internal Css Means When You Write Html and Css Both One file, hold  To Css on head section in html file, In this Case You can Manage Css And Html in Single file, it is Easy  but it can create confusion and can become complicated if you work large project. 



      under html file <head> section</head> write css And Then <body> section </body> put html code this method is called Internal css...

      See An Example of Internal Css

      <!doctype html>
      <html>
      <head>
      <style>
      .header {
       width:100%;
      height:300px;
      background:green;
      }
      </style>
      </head>

      <body>
      <div class="header"></div>
      </body>
      </html>








      2.External Css : External css when we create separate css File And Link That In html file. this method is best if you work on large project....

      Connect  Css File With Html file by link in head section 

      <link href="Name of css file" rel="stylesheet">

      See An Example of External Css

      one create Css Separate file

      .header {
       width:100%;
      height:300px;
      background:green;
      }

      Second Create HTML script file

      <!doctype html>
      <html>
      <head>
      <link href="Name of css file" rel="stylesheet">
      </head>

      <body>
      <div class="header"></div>
      </body>
      </html>

      css





      Inline Css : inline css means you create single file of html css and write all code with together in one line 


      See An Example of External Css

      <article Style="background-color:red;width:30%;height:200px; float:left"</article>

      css




      How Work Css And Html both?? 

      Css And Html conversion Between Each other By id, class and Tag,

      Id And Class describe Element whose html document you want Give style There is No Rule  For Why use Id Or class; Id Uses for single Element And Class Uses for Multi Element But you can use Both as your choice ,Tag in Css; Means Css Direct Describe To html Tag for Style, you can Apply  Css Tag, class And id Together for one Element....

      If You Want Create Css Id You Must use hash #Tag With Name Of what Name You give; Always Example


      Example of Apply id in css #navbar it means it describe id in html


      #navbar {
         width:""
        height:""
        margin:""

      }

      Example of Apply Class in css .navbar it means it describe class in html

      .navbar {
         width:""
        height:""
        margin:""

      }


      p {
         width:""
        height:""
        margin:""

      }

      Their is some example of id, tag and class See Below Script Example : Right side HTML File And Left Side Css File 

      HTML CSS Element Described By Id



      css



      How Can Apply To Css Class ??

      HTML CSS Element Described By class

      css


      How Can Apply To Css Tag?


      HTML CSS Element Described By Tag


      css



      Visit More