Home QBASIC C Java HTML
  • More Courses
  • MCQs
  • Blog Download
  • Tools
  • Contact

    Contents

    Introduction | First Program | Tag and Attributes


    HTML (Hypertext Markup Language) is a markup language which is used to create web pages. It was invented by Tim Berners-Lee in around 1989 and 1990. HTML is based on previous language called SGML which is stands for 'Standard Generalized Markup Language'. 

    It allows the webpage to contain headings, paragraphs, lines, tables, order and unordered lists etc. It also allows images and objects to be embedded in the web page and create interactive forms. It is written in the form of HTML tags surrounded by algle brackets (<>). It can also load the crepting language such javascript or vbscript to make the webpage interactive. HTML can also be used to include cascading style sheet to define the appearence and layout of text and other material. 

    HTML is platform independent language. it is not a programming language like C, C++, java and QBASIC. Basically, it is a set of markup tags that tells the browser how to display the web page content. 

    Video Tutorial 

    Types of Tags

    A tag is a keyword enclosed in angle brackets. There are two tyeps of tags in HTML.

    1. Paired Tags (Container Tag)
    2. Singular Tags (Empty Tag/ Stand alone Tag)

    Paired Tags

    It is also called container tag. A tag is said to a paired tag if it along with opening tag and closing tag appears at the end. For Example <h1> </h1>. Heading tag <h1> is a container tag, because it has both opening tag and closing tag. 

    Singular Tags

    Singular tags are single tags with no closing tag. These tags are also called Singular Tags. These are also called non-container tags because they do not contain any content.

    It is recommended to close the unpaired/singular tags also. But unfortunately, we do not have the closing tag for those. So, an unpaired tag is closed after adding a slash(/) just before the greater than > sign. For example: <br />.

    Basic Structure of HTML Document

    The HTML document is mainly divided into two sections. They are: Head section and Body section. 

    Head section gives a descriptive title to a document. Different types of meta tags and css cods are also kept in head section of HTML document and body section contains all the content of webpage which we can see on the page. We can add text, pictures, videos, links, tables, lists etc inside body tag. 

    <html>
    <head> 
        <title> Document Title </title>
    </head>
    <body>
        <h1> Welcome </h1>
        <p> It is a Body of Webpage </p>
    </body>
    </html>
    

     

    HTML Heading Tag

    Heading tag is used to give headings of different sizes in a document. There are six different HTML heading tags, which gives different heading sizes and are defined by <h1> to <h6> tags. <h1> gives the largest heading and <h6> gives the smallest one. So <h1> can be used for most important headings and <h6> can be used for a least important one.

    Example: 

    <!DOCTYPE html> 
    <head>
          <title> HTML Heading Tag </title>
    </head> 
    <body> 
         <h1> This is Heading 1 </h1>
         <h2> This is Heading 2 </h2>
         <h3> This is Heading 3 </h3> 
         <h4> This is Heading 4 </h4> 
         <h5> This is Heading 5 </h5> 
         <h6> This is Heading 6 </h6> 
    </body> 
    </html> 
    

    HTML Paragraph Tag

    The <p> tag is used to define a paragraph in a document. HTML paragraph or HTML <p> tag gives the text inside it, a paragraph like finishing. It is a notable point that a browser itself add an empty line before and after a paragraph.

    Example :

    <!DOCTYPE html>
    <head>
         <title> HTML Paragraph Tag </title>
    </head> 
    <body> 
         <p> This is First Paragraph </p>
         <p> This is Second Paragraph </p> 
    </body> 
    </html> 
    

    141