Introduction

HTML stands for HyperText Markup Language.

It is the standard language for creating web pages.

HTML describes the structure of a web page.

It uses elements to define content.

Elements are represented by tags.

<html>...</html> <body>...</body>

HTML Boiler Plate:


<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <title>Document</title>
  <link rel="stylesheet" href="style.css" />
</head>
<body>
  <h1>Hello, world!</h1>
  <script src="script.js"></script>
</body>
</html>
  
HTML Elements

An HTML element is everything from the start tag to the end tag.

Some elements are empty and do not have an end tag.

<p>This is a paragraph</p>
Attributes

HTML attributes provide additional information about elements.

Attributes are always specified in the start tag.

Attributes usually come in name/value pairs.

<a href="https://example.com">Visit</a>
Forms

HTML forms are used to collect user input.

Form elements include input, textarea, button, etc.

Each form element has specific attributes.

<form><input type="text" name="name" /></form>
Semantic HTML

Semantic HTML introduces meaning to the web page.

Examples include <article>, <section>, <nav>, and <aside>.

Improves accessibility and SEO.

<section>...</section>