DEV Community

rashidyaqoob
rashidyaqoob

Posted on

Basic HTML Page

The basic HTML page looks as shown below:

< !doctype html >

< html >

< head >

    < title>Basic web page < /title>

< /head>

< body>

< /body>
< /html>
  1. < !doctype html> : This is used to tell the browser about the version of HTML used in the document.
  2. < html> : This defines the root of html and wraps the code inside it.
  3. < head> : This tag conatins tags like < style> tag, < title> tag, Inpage css etc.
  4. < body> : This tag contains the actual data that is to be displayed on a web page.
    Body tag contains other tags like < div> tag, < span> tag,< p> etc.These tags are used to form the structure of the web page.

    HTML Heading Tags:

    1. < h1> < /h1>
    2. < h2> < /h2>
    3. < h3> < /h3>
    4. < h4> < /h4>
    5. < h5> < /h5>
    6. < h6> < /h6>

    Every tag has opening tag and closing tag and within them is the text to be displayed.
    These heading tags are used to define the headings of the web page according to their requirements.

    Paragraph Tag:

    Paragraph tag is denoted by < p>(opening tag) < /p>(closing tag) and within these tags we can write the text to be displayed.

    HTML Images:

    In order to insert images into the webpage we can use < img> tag.
    < img src="source-of-the-image" alt="alternative-text">

    List tags:

    We have three types of lists:

    1. Ordered List.
    2. Unordered List.
    3. Definition List.

    ORDERED LIST:

    The tags used for ordered list is < ol> < /ol> and inside these tags comes list item tag denoted by < li> </ li>.

    < ol>
    
    < li>One < /li>
    
    < li>Two < /li>
    
    < li>Three < /li>
    
    < /ol>
    

    UN-ORDERED LIST:

    The tags used for ordered list is < ul> < /ul> and inside these tags comes list item tag denoted by < li> </ li>.

    < ul>
    
    < li>One < /li>
    
    < li>Two < /li>
    
    < li>Three < /li>
    
    < /ul>
    

    DEFINITION LIST:

    Definition list is used to display description list.

    Tags used are:

    < dl> 
    
    <dt>Item-1</dt>
    
    <dd>Definition-1</dd>
    
    <dt>Item-2</dt>
    
    <dd>Definition-2</dd>
    
    < /dl>
    

    < dt> : It is used to define the item to be described.

    < dd> : It is used to give description about the item.

    Both of these tags are wrapped inside the < dl> tag.

    We will continue to understand more tags in future posts.

Top comments (0)