Advertisement

Google Ad Slot: content-top

HTML Basics

~1 min read · HTML
On this page

HTML Basics refers to the fundamental elements and concepts used to create web pages using HTML (Hypertext Markup Language). These include:

  • Basic HTML Document
  • HTML Basic Structure
  • HTML Headings
  • HTML Paragraph
  • HTML Break
  • HTML Horizontal Line
  • HTML Images
  • HTML Links

Basic HTML Document


A basic HTML document is the fundamental structure of a web page written in HTML (Hypertext Markup Language). It typically includes

Tags

Descriptions

<!DOCTYPE html>

Declares the document type as HTML5

<html>

The root element that encloses the entire HTML content.

<head>

Contains metadata, like the page title and links to stylesheets

<title>

Sets the title displayed on the browser tab

<body>

Holds the visible content of the web page, such as text, images, and links.

Example : The Basic HTML structure.
HTML

GeeksforGeeks is a online study platform

Try it yourself

HTML Basic structure

HTML Basic structure

HTML Headings


HTML headings are defined between  <h1> to <h6> tags.

<h1> defines the higher heading. <h6> defines the lower heading: 

Syntax:

<h1></h1>
<h2></h2>
<h3></h3>
<h4></h4>
<h5></h5>
<h6></h6>
Example

This is heading 1

This is heading 2

This is heading 3

Try it yourself

HTML Paragraph


HTML paragraph are defined by  <p> tags.

Syntax:

<p></p>
Example

This is a paragraph.

Try it yourself

HTML Break


HTML break are defined by  <br> tags.

Syntax:

<br/>
Example

Hello whereisstuff


Hello whereisstuff

Try it yourself

HTML Horizontal Line


HTML Horizontal line are defined by  <hr> tags.

Syntax:

<hr/>
Example

Hello whereisstuff


Hello whereisstuff

Try it yourself

HTML Image


HTML Image are defined by  <img> tags.

Syntax:

<img>
Example
whereisstuff.com
Try it yourself

HTML Link


HTML Link are defined by  <a> tags.

Syntax:

<a href=""></a>