Welcome to the basics of HTML, the fundamental building block of web design. HTML (Hypertext Markup Language) is used to create and structure content on the web.

HTML Structure

Every HTML document starts with a <!DOCTYPE html> declaration, followed by the opening <html> tag. Inside the <html> tag, you have two main sections: <head> and <body>.

  • <head>: Contains meta-information about the document, such as its title and links to CSS files.
  • <body>: Contains the content of the document, such as text, images, and other media.

Basic Tags

Here are some essential HTML tags:

  • <h1> to <h6>: Define headings.
  • <p>: Defines a paragraph.
  • <a>: Defines a hyperlink.
  • <img>: Defines an image.

Example

Here's a simple example of an HTML document:

<!DOCTYPE html>
<html>
<head>
  <title>My Web Page</title>
</head>
<body>
  <h1>Welcome to My Web Page</h1>
  <p>This is a paragraph.</p>
  <a href="https://www.example.com">Visit Example.com</a>
  <img src="https://cloud-image.ullrai.com/q/web_design/" alt="Web Design"/>
</body>
</html>

For more information on HTML, check out our HTML Tutorial.

Resources