Hear we describe how to Learn HTML easy way for the beginner with example and Description about the HTML tags and the attributes with example.

What is HTML?

HTML (Hypertext Markup Language) is the language in which most websites are written. HTML is used to create pages and make the webpage visible.

The History of HTML

HTML was first created by Tim Berners-Lee, Robert Cailliau, and others starting in 1989

The current standard of HTML is dubbed HTML 5 and is specifically at version 5.2.

Hypertext means that the document contains text, links, pictures, and even sound and video.

A Markup Language is a way that computers speak to each other to control how text is processed and presented. To do this HTML uses two things: tags and attributes.


To write HTML programming language we are use “tags”, browser read the tags and understand how a webpage should look. The tags usually come in pairs: an opening tag defines the start of a Html code and an ending tag defines the end of Html code. There are many different kinds of tags present in html, and each one has use for a different purpose.

Now check Here is an example how to write HTML code.

<DOCTYPE html>
  <title>This is the title of the page.</title>
<body bgcolor="gray">
 <p>This is a paragraph.</p>
 <a href="https://spectrumtech.in>This is a link.</a>
 <img src="image url" alt="describe the image use for" />

Some of HTML tags:

Tag name Name Function Code Example
<!DOCTYPE> Doctype Defines the Document type <!DOCTYPE> html
<html> html Defines an HTML document <html>All code and all tags are under this tag</html>
<head> Head Contains any code that is not used to display elements on the webpage <head>here we write the title tag, favicon link, external CSS link, style tag, external JS link and more… </head>
<title> title Defines the title of the webpage <title>(shown on the tab in browser)</title>
<body> body Contains the visible elements of the webpage <body>Which are display on the website ll are written under this body tag</body>
<h1> to <h6> Headings Headings of various sizes there are six heading tag h1 to h6. h1 is the largest and h6 is the smallest
<p> Paragraph Defines a paragraph of text <p>content here</p>
<Anchor> Anchor Creates active links to other web pages <a href="www.spectrumtech.in">Learn HTML for the beginner in easy way</a>
<img> image Defines <img>Displays an image on the page</img>
<br> html Break line <br>break the line. if you use <br>“here use br tag” tag with in a line then it break the line after the br tag.
<center> html Moves content to the center of the box or page <center>display the text in center with in the area.</center>
<script> html Creates a script in the webpage <script>Here we write the script like JavaScript or Jquery</script>

What is HTML Attributes

Attributes provide additional information about HTML tag and complete the purpose for the HTML tags.

  • all HTML tag have attributes.
  • All attributes are start in the starting of html tag.
  • Attributes have the name and value pairs Example: src=”image path”. there the “src” is Attributes name the the “image path” is the Attributes value.
  • All the attributes values are written with in the Single or Double Quotes