Welcome to the basics of HTML for developers! Whether you're new to web development or looking to refresh your skills, this guide will help you understand the fundamental building blocks of HTML.

HTML Structure

HTML (Hypertext Markup Language) is the standard markup language for documents designed to be displayed in a web browser. Here's a basic structure of an HTML document:

<!DOCTYPE html>
<html>
<head>
  <title>Page Title</title>
</head>
<body>
  <h1>This is a Heading</h1>
  <p>This is a paragraph.</p>
</body>
</html>

Elements

HTML elements are the fundamental components of an HTML page. They are defined by tags. For example:

  • <h1> to <h6> are heading tags.
  • <p> is a paragraph tag.
  • <a> is an anchor tag, used for creating hyperlinks.

Syntax

When writing HTML, it's important to follow proper syntax:

  • All HTML elements must have a closing tag.
  • Elements can be nested within other elements.
  • Attributes provide additional information about elements.

Example

Here's an example of a simple HTML page with a heading and a paragraph:

<!DOCTYPE html>
<html>
<head>
  <title>My First HTML Page</title>
</head>
<body>
  <h1>Welcome to My Website</h1>
  <p>This is my first HTML page.</p>
</body>
</html>

Resources

For more information and resources on HTML, please visit our HTML Tutorial. It covers more advanced topics and provides practical examples.