Thursday, October 11, 2018

Structure of HTML

Structure of HTML:-

HEAD TAG:- 

In this section title is written in title open and close tag. In this section we also write java script code and code for connecting CSS(Cascading Style Sheet).

BODY TAG:-

In this section we write the the content of the HTML page.   

HTML ELEMENT:-

All HTML tag are the predefined keyword written within the angle brackets ('<' and '>') . Each tag has a specific meaning. So for writing the HTML code we must remember these predefined tags.
             An HTML element is a tag pair enclosed with displayable contents.
<p> This  is SRPS. It is very nice.</p> is the example of HTML elements. There are two types of HTML elements.

Container element:-

Container element or container tag are those elements who has opening and closing tag and can contain other  HTML elements.

Empty element:-

Empty element or empty tag are those elements who doesn't have closing tag. It is having only opening tag. example <img>, <br>,<hr> etc.

Below is the example of container and empty elements.

                                                  <html>
                                                 <head>
                                        <title>SRPS</title>
                                                </head>
                                               <body>
<p>This is SRPS. It is located at purana dhakhana basti uttarpradesh </p>   <!-- container elements  -->

                                          <hr width="80%" size="10px">     <!-- empty elements  -->

                                           <p>end of the this  content.</p>     <!-- container elements  -->
                                                </body>
                                              </html>

  


Structure of HTML TAG


Special characters in HTML:-

There are some special characters in HTML which we can't use directly in HTML documents like >,<, &, ", blank space etc.
Characters                                       symbol
>                                                       &gt;
<                                                       &lt;
&                                                      &amp;
"                                                       &quot;
Blank Space                                    &nbsp;

             etc.
 
                  

Font and Basefont tag of html in a very easy way.

Difference between font and basefont tag in html:- Font tag is a container tag. Basefont tag is empty tag. We can apply font tag in a ...