×
   ❮     
HTML CSS MySql Javascript SQL PYTHON JAVA C++ C# BOOTSTRAP REACT XML NODEJS ANGULAR DJango Rust Android VUE
     ❯   

HTML Element


HTML Basic Tags

HTML basic tags are fundamental elements used to structure and format content on web pages.

These tags provide the building blocks for creating web documents.


What is Element in HTML?

HTML element is defined by a starting tag.

If the element contains other content, it ends with a closing tag, where the element name is preceded by a forward slash as shown below with few tags:


HTML Elements

Start Tag Content End Tag
<html> This is html element </html>
<p> This is paragraph content </p>
<h1> This is heading content </h1>
<div> This is division content. </div>

Nested HTML Elements

All HTML documents consist of nested HTML elements.

The <html> element is the root element and it defines the HTML document.

Example

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

<h1>This is a Heading</h1>
<p>This is a paragraph Hussein.</p>

</body>
</html>
Try it Yourself »

Body tag

The <body> element defines the document's body.

The <body> element includes all the contents of an HTML document, consisting of headings, paragraphs, links, tables, lists, etc.

Example

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

<h1>Hello World</h1>

</body>
</html>
Try it Yourself »

Hey there! Let's go for Learn fasta then! It is more than just coding; it is to have the superpower that can solve any problem. Through simple and easy-to-grasp examples you will sail through the learning process. In addition, it is not just about coding– you will acquire competencies on how to solve complex problems, analyze data, and come up with efficient solutions. Shall we start this wonderful journey together! learnfasta.com terms of use, Copyright 2025 All Rights Reserved.