HTML Basics

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.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML</title>
</head>
<body>
<p>GeeksforGeeks is a online study platform</p>
</body>
</html>

Try it yourself

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
<!DOCTYPE html>
<h1>This is heading 1</h1>
<h2>This is heading 2</h1>
<h3>This is heading 3</h3>

Try it yourself


HTML Paragraph


HTML paragraph are defined by  <p> tags.

Syntax:

<p></p>
Example
<!DOCTYPE html>
<p>This is a paragraph.</p>

Try it yourself


HTML Break


HTML break are defined by  <br> tags.

Syntax:

<br/>
Example
<!DOCTYPE html>
<p>Hello whereisstuff</p>
<br/>
<p>Hello whereisstuff</p>

Try it yourself


HTML Horizontal Line


HTML Horizontal line are defined by  <hr> tags.

Syntax:

<hr/>
Example
<!DOCTYPE html>
<p>Hello whereisstuff</p>
<hr/>
<p>Hello whereisstuff</p>

Try it yourself


HTML Image


HTML Image are defined by  <img> tags.

Syntax:

<img>
Example
<!DOCTYPE html>
<img src="/assets/images/whereisstuff.png" alt="whereisstuff.com" width="100" height="100">

Try it yourself


HTML Link


HTML Link are defined by  <a> tags.

Syntax:

<a href=""></a>
Example
<!DOCTYPE html>
<a href="https://www.whereisstuff.com">link</a>

Try it yourself


Whereisstuff is simple learing platform for beginer to advance level to improve there skills in technologies.we will provide all material free of cost.you can write a code in runkit workspace and we provide some extrac features also, you agree to have read and accepted our terms of use, cookie and privacy policy.
© Copyright 2024 www.whereisstuff.com. All rights reserved. Developed by whereisstuff Tech.