Document Structure
| Tag | Purpose | Example |
|---|---|---|
<!DOCTYPE html> | Declares HTML5 document type | <!DOCTYPE html> |
<html> | Root element of document | <html lang="es"> |
<head> | Container for metadata | <head>...</head> |
<body> | Container for visible content | <body>...</body> |
Metadata Tags
Essential Meta Tags
Essential Meta Tags
Semantic HTML5 Elements
Layout Structure
| Tag | Purpose | Used In Project |
|---|---|---|
<header> | Page or section header | Main header with logo and navigation |
<nav> | Navigation links container | Primary navigation, category links |
<main> | Main content area | Product catalog and hero section |
<section> | Thematic content section | Hero, benefits, products sections |
<article> | Independent content | Benefit cards, product cards |
<aside> | Related side content | Not used in this project |
<footer> | Page or section footer | Site footer with links and social |
Content Elements
Common Content Tags
Common Content Tags
Form Elements
Form Structure
Input Types
Text Inputs
type="text"- Plain texttype="search"- Search fieldtype="email"- Email validationtype="password"- Hidden inputtype="tel"- Phone numbertype="url"- URL validation
Other Inputs
type="number"- Numeric inputtype="checkbox"- Toggle optiontype="radio"- Single choicetype="date"- Date pickertype="file"- File uploadtype="submit"- Submit button
Form Elements Reference
| Tag | Purpose | Example |
|---|---|---|
<form> | Form container | <form action="/submit" method="POST"> |
<input> | Input field | <input type="text" name="username"> |
<textarea> | Multi-line text | <textarea rows="4"></textarea> |
<select> | Dropdown menu | <select><option>...</option></select> |
<option> | Select option | <option value="1">Option 1</option> |
<button> | Clickable button | <button type="submit">Send</button> |
<label> | Input label | <label for="email">Email</label> |
Media Elements
Images
Key Attributes
| Attribute | Purpose | Example |
|---|---|---|
src | Image source URL | src="/images/logo.png" |
alt | Alternative text (accessibility) | alt="Company logo" |
loading | Lazy loading | loading="lazy" |
width | Image width | width="400" |
height | Image height | height="300" |
SVG (Inline Graphics)
Used for icons in the project:Special Elements
Template
The
<template> tag contains HTML that isn’t rendered but can be cloned and inserted dynamically with JavaScript.Scripts
Script Attributes
| Attribute | Purpose | Usage |
|---|---|---|
type="module" | ES6 module | Enables import/export |
src | External script | src="/main.js" |
defer | Execute after parsing | <script defer src="..."> |
async | Execute when ready | <script async src="..."> |
Void Elements (Self-Closing)
These elements don’t have closing tags:<br>- Line break<hr>- Horizontal rule<img>- Image<input>- Form input<meta>- Metadata<link>- External resource
HTML Entities
Special characters used in the project:| Entity | Character | Usage |
|---|---|---|
© | © | Copyright symbol |
| (space) | Non-breaking space |
< | < | Less than |
> | > | Greater than |
& | & | Ampersand |
" | ” | Quote |
Best Practices
Use semantic HTML elements instead of generic
<div> tags when possibleAlways include
alt attributes on images for accessibilityUse proper heading hierarchy (h1 → h2 → h3, don’t skip levels)
Include
lang attribute on <html> tagUse
<button> for clickable actions, <a> for navigationNext Steps
CSS Properties
Learn about CSS properties used in the project
HTML Fundamentals
Deep dive into HTML concepts