Skip to content

HTML Basic | Definition | Tags and attributes | Elements

  • by

The HTML code makes the structure of the web page. Like a What will content in the heading, what external library, CSS, Javascript will use in a web page. And placing a many TAG for basic content representation. In this tutorial, you will learn about HTML Basic Tag and attributes, with definition and examples.

Definition: What is HTML?

The HTML is a stand for HyperText Markup Language. It’s not a programming language like Java, Python, etc.

HTML Basics

The HTML code has some basic tag and instruction. Without this tag, it’s not possible to make a web page.

  • DTD
  • Anatomy of an HTML element (basic HTML elements)
  • HTML File Type
  • Tags and Attributes
  • Web Browsers

DTD: Document Definition Types

The first line of HTML file is with <!DOCTYPE html>, it’s needed to show set of rule of HTML.

Learn more about DTD – Document Definition Types

Anatomy of an HTML element

Anatomy of an HTML element
  1. Open tag:  The element like “P” wrapped in opening and closing <> angle brackets. Its begins any tag element, same as the above images showed.
  2. Close tag: The same as the opening tag, except that it includes a forward slash “/” before the element name. A TAG element ends here. Don’t forget to add Close TAG, otherwise, web page looks messy.
  3. The content: Here content will come, which shows to the user in a webpage. Like upper image showed simple text.
  4. The element: An opening and closing tag with content comprise called element.

HTML File Type

HTML file type save with “.html” or “html”. Mostly nowadays only “.html” used by developers. Follow this tutorial for more detials – HTML vs HTM.

HTML Tags and Attributes

Let’s see the first one example of HTML web page, then we will see the basic html tags list.

<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>

    <h1>HTML First Program</h1>

    <p>HTML Hello World.</p>

    </body>
</html>

Basic HTML elements

  • <html> … </html>– The HTML document starts and ends with this tag.
  • <body>… </body>– All visible part comes here. Like Heading, paragraph, table, etc.
  • <h1> to <h6> Tags – Headings.
  • <p> Tag – Paragraphs.

This is some basic tags. The list of Tags in HTML very long, we will discuss it another tutorial.

Elements can also have attributes that look like below image:

HTML Attribute

Web Browsers

The Web Browsers are read the HTML file code and display content to users. The browser will not show TAG like <h1>, <p>, <body> etc. Only Content will show to users.

Some web browsers are: – Chrome, Safari, Firefox etc.

Do comment if any doubt and suggestion for this tutorial.

Note: All example of HTML Basic is in HTML5, if you are using the above version then maybe some method depreciated and if using lover version like HTML4, then some tags not supported.

Leave a Reply

Discover more from Tutorial

Subscribe now to keep reading and get access to the full archive.

Continue reading