HTML - HyperText Markup Language
The fundamental structure of the web
🌐 What is HTML?
HTML (HyperText Markup Language) is the standard markup language for creating web pages. It describes the structure of a web page through the use of elements and tags.
Code HTML
<!DOCTYPE html>
<html>
<head>
<title>Mi Página</title>
</head>
<body>
<h1>Hola Mundo</h1>
<p>Mi primera página web</p>
</body>
</html>
Result in the Browser
Hola Mundo
Mi primera página web
🏗️ Basic Structure
<!DOCTYPE html>
Document type declaration
<html>
Root element that contains the entire document
<head>
Metadata and page information
<body>
Visible content of the page
🔧 Types of Elements
Edit the HTML:
Result:
Edit the HTML:
Result:
Edit the HTML:
Result:
Edit the HTML:
Result:
Edit the HTML:
Result:
Edit the HTML:
Result:
🎯 HTML Attributes
Attributes Global
class- Specifies CSSid- Unique identifierstyle- Inline stylestitle- Tooltip info
Attributes of Forms
type- Type of inputplaceholder- Example textrequired- Required fielddisabled- Disabled
Attributes of Links
href- URL targettarget- Where to openrel- Relationshipdownload- Download file
Attributes of Multimedia
src- File sourcealt- Alternative textwidth/height- Dimensionscontrols- Playback controls
Try the Attributes:
Result:
<div>Este elemento cambiará con los atributos</div>
🏛️ HTML5 Semantics
Semantic Elements
<header>
Header of the page or section
<nav>
Main navigation
<main>
Main content
<article>
Independent content
<section>
Thematic section
<aside>
Related content
<footer>
Page footer
🎬 Multimedia
Code HTML:
<audio controls>
<source src="audio.mp3" type="audio/mpeg">
<source src="audio.ogg" type="audio/ogg">
Tu navegador no soporta audio HTML5.</audio>
Result:
Code HTML:
<video width="640" height="360" controls poster="miniatura.jpg">
<source src="video.mp4" type="video/mp4">
<source src="video.webm" type="video/webm">
Tu navegador no soporta video HTML5.</video>
Result:
Code HTML:
<iframe
src="https://www.google.com/maps/embed?..."
width="600"
height="450"
frameborder="0"
style="border:0"
allowfullscreen>
</iframe>
Result:
📋 Forms Advanced
Form Builder:
Generated Code:
♿ Validation and Accessibility
HTML5 Validation
ARIA Attributes
💪 HTML Live Editor
HTML:
Preview:
🛠️ Resources and Tools
References
Tools
💡 Best Practices
Semantics Correct
Use the HTML appropriate elements for each type of content
Accessibility
Include alt, labels and ARIA attributes where needed
Validation
Validate your HTML code regularly
Mobile First
Design for mobile devices first