HTML5 is the latest version of HyperText Markup Language, the standard markup language for creating web pages. It introduces new elements, attributes, and behaviors, along with a larger set of technologies that allow more diverse and powerful websites and applications.
What is HTML?
HyperText: Text with links to other text
Markup Language: A system for annotating text to indicate structure and presentation
Standard: Maintained by the World Wide Web Consortium (W3C)
💡 Tip: HTML5 is not just HTML + CSS + JavaScript. It's a collection of technologies including new HTML elements, CSS3, JavaScript APIs, and more.
2. HTML Basics
Basic HTML Document Structure
My First HTML Page
Hello, World!
This is my first HTML page.
Understanding Each Part:
- Declares this as an HTML5 document
- Root element of the page
- Contains metadata about the document
- Contains the visible content
HTML Tags and Elements
HTML uses tags to mark up content. Most tags come in pairs:
Content goes here
🏋️ Exercise 1:
Create a basic HTML page with a title, heading, and paragraph about yourself.
3. Document Structure
The Head Section
The section contains metadata and resources:
Page Title
Common Meta Tags
charset - Character encoding (UTF-8 is standard)
viewport - Controls layout on mobile browsers
description - Page description for search engines
keywords - Keywords for search engines
⚠️ Important: The viewport meta tag is crucial for responsive design on mobile devices.
4. HTML Elements
Text Elements
Main Heading
Subheading
Sub-subheading
This is a paragraph.
Bold textItalic text
Highlighted text
Small text
Deleted text
Inserted text