In this article, I will give you clear explanation about HTML.

What is HTML?


HTML is a set of “markup” symbols or codes embedded in a file intended to be displayed in a worldwide web browser.

The markup tells the web browser how to display text, images, audio and video files on a web page.

The Individual markup elements are called tags.

<html>, <title>, <table>, </html>, </table>

HTML Document Structure

The HTML document is divided into two main sections:      

HEAD : Contains info concerning the document :

–  Title of the page

–  Meta tags : Used to describe content

–  JavaScript and style sheets links

BODY : The document contains the actual contents

–  This is the section that appears in the browser window

HTML Basic Tags

The basic structure of all HTML documents is simple and should include the following minimum elements or tags:

            <html> – HTML pages – Main Container

           <head> – for page header information

            <title> – title of the page

<body> – The body is the main element of the page

Sample HTML Document

<title>My First web page</title>
<body> Hello Everyone…</body>

Information that the browser ignores:

  • Tabs
  • Multiple spaces will ignore and appear as a single space
  • New lines

Eg :


How are you?”

The browser will ignore the free spaces and new line

“Hello, how are you?”

HTML Attributes

The attributes provide additional information about the element.

Attributes of the start tags are always specified.

Attributes come as name / value pairs like:

 Name = “value”

<body bgcolor=“yellow” background=“img1.jpg”>

Headings: <h1> …..<h6>

§  You can make different headings on your page

§  Headers appear in bold

  • An empty row will also follow the headings
  • Use for titles
  • h1 is the largest font and h6 is the smallest header

Tags without end tags

Most (but not all!) HTML tags have a open tag and an close tag

Eg :

<h1> Hello,world!</h1>

But some tags use without end tags

<br/> – break rule

<hr/> – creates a horizontal rule

<img/> – insert image

<meta/> – insert meta data to a webpage

<DOCTYPE/> – define document type


Browser will not display text in between;

<!—this is a comment -->
<!—this is another

Font tags

The <font> tag specifies the font face, font size, and font color of text.

<font face=“Arial” size=“4” color=“red”>
Hello world

Text formatting tags


<b> some text </b> or <strong>

The text between the tags will be bold


<I> some text </I> or <em>

Italic display the text at a slight angle

Underline :

<u> some text </u>

Underline the text

Strike – out :

<strike> some text </strike>

Puts a line right through the Centre of the text

Centre :

<center> some text </center>

Makes everything in between the tags centered (center of the page)

 Image Tags

<img/> tag defines an image in a HTML page

<img src=“apple.jpg” title=“fresh fruits” height=“100px” width=“100px” />

List in HTML

Lists are used to organize items in the browser window:

  1. Unordered list

Bulleted list – list items with no particular order




  • Andrew
  • Jack
  • Tara

  2. Ordered list – Numbered list

        <ol> Andrew </ol>	
        <ol> Jack </ol>	
        <ol> Tara </ol>


  1. Andrew
  2. jack
  3. Tara

Hyperlinks (Anchor Tag)

Hyperlinks are highlighted and underlined text. When you click on it, it takes you to another page on the web.

<a href=“index.html”> Home </a>

Targeted Links

If you specify target = “_blank”, a new browser window will be opened.

<a href= target=“_blank”>Open in a new page </a>  

HTML Tables

Tables represent a simple mechanism for creating rows and columns of data.

Basic Tag structure

<tr> - Table row
<th> - Table heading
<td> - Table data


Inline Frames

Inserts a HTML document inside another

Created with the <iframe> tag

<iframe src=“link.html”>Link</iframe>

What is HTML5?

HTML5 is the new HTML Version of the HTML.

  • New Elements and Attributes
  • Web Applications
  • Full CSS3 Support
  • 2D/3D Graphics
  • Local SQL Databases

Audio Tags

The HTML <audio> element is used to input the sound file from the storage using the src attribute or the <source> element.

<head><title>Audio Tag</title></head>
<audio controls>
<source src=“audio1.mp3” type=“audio/mpeg”>

Video Tag

The HTML <video> element is used to embed video content in documents.

<head><title>Video Tag</title></head>
<video width=“1200px” height=“850px” controls autoplay>
<source src=“video1.mp4” type=“video/mp4”>

HTML Editors

We can use HTML Editor applications for easy coding. We can see different type of HTML Editors in the market.

Below are the most used Editors based on popularity and features.

Below are the most used Editors based on popularity and features.

Notepad++ is a free open source tool and it can be Customize for developers.

Available for: Windows and Linux (via Wine)

Sublime Text is a very attractive Cross-platform tool used by the many developers.

Available for: Windows, OS X and Linux (32/64 bit)

Visual Studio Code is a multi-language and multi-platform support tool which many developers used for coding.

Available for: Linux, Windows and OS X

Dreamweaver is a Premium platform to support for the write codes in many programming languages.

Available for: Windows and OS X

HTML Forms

What is the Form?

HTML Form is form used to collect user data on web pages and it allow interaction between user and web server.

Form Elements

The HTML <form> tags contain three basic functions

  1. To define input for into <input/>
  2. To trigger action <input type=“submit”/>
  3. Attributes to define desired action <form method= “post” action=“login.php”>

Basic input types

Input TypeDescription
Textinsert a text box  
Checkboxinsert a check box  
Radioinsert a radio button
Passwordinsert a password box through the protect entry
Hiddeninput to script not supplied by user  
Buttoninsert a button
Submitstart the action
Resetdeletes previous entries

Action and Method response

  • Method is either GET or POST

                        GET – form data sent as part of URL.

                        POST – form data sent in HTML header.

  • Action – defined to send the data from HTML or PHP script to the relevant location on the server

GET Method Example

<title>Login Form</title>
<form name=“frmLogin” action="login.php" method="GET">
          <div class="container">   
              <label>Username : </label>   
              <input type="text" placeholder="Enter Username" name="username" required>  
              <label>Password : </label>   
              <input type="password" placeholder="Enter Password" name="password" required>  
              <button type="submit">Login</button>
              <button type="button" class="cancelbtn"> Cancel</button>   
              Forgot <a href="#"> password? </a>   

Note – It’s not advisable to enter information such as password through the GET method. Use the POST Method for it.

POST method Example

<title>Login Form</title>
<form name=“frmLogin” action="login.php" method="POST">
          <div class="container">   
              <label>Username : </label>   
              <input type="text" placeholder="Enter Username" name="username" required>  
              <label>Password : </label>   
              <input type="password" placeholder="Enter Password" name="password" required>  
              <button type="submit">Login</button>   
              <button type="button" class="cancelbtn"> Cancel</button>   
              Forgot <a href="#"> password? </a>   

we can more stylish this form adding CSS.

Checkbox Tag

The <Checkbox> tag use to input that let you choose multiple values.

<form name=“ testForm” action="save.php" method="POST">
<input type= “checkbox” name= “checkbox1” value= “checkbox” checked= “checked”>

Radiobox Tag

The <Radiobox> tag use to input lets user choose one value.

<form name=“ testForm” action="save.php" method="POST">
<input type= “radio” name= “radiobtn” value= “M” checked= “checked”>Male

Note – each radio button group must be use same name.

Textarea Tag

The <textarea> tag is used to allows the user to input text over multiple rows.

<form name=“ testForm” action="save.php" method="POST">
<textarea name= “address” row= “4” cols= “36”> ……</textarea>

Combobox Tag

The <combobox> tag allows the user to select an option through the multiple options in the form.

<form name=“testForm” action="save.php" method="POST">
<select name= “Gender”>
<option selected= “selected” value=“M”>Male</option>
<option value=“F”>Female</option>

Listbox Tag

The <listbox> tag used to select more than one item from the box.

<form name=“ testForm” action="save.php" method="POST">
<select name= “list1” size= “5” multiple= “multiple”>
<option value= “1”>Item 1</option>
<option value= “2”>Item 2</option>
<option value= “3”>Item 3</option>
<option value= “4”>Item 4</option>
<option value= “5”>Item 5</option>
<option value= “0”>All</option>

File Upload Tag

The <input> tag with Type = “file” allows the user to select one or more files from their device. Once selected, the file can be uploaded to a server

<form name=“frmLogin” action="login.php" method="POST">
<input type= “file” name= “datafile” size= “30”>


In this tutorial we learned basic of the HTML as well as Tags.So If you have any queries related to this article please leave your comment in the comment section below.


Leave a Comment

Your email address will not be published. Required fields are marked *

Translate »
error: Content is protected !!
Open chat