Beginner Topic 2 of 51 Web Development
HTML Basics
Markup language structuring web page content.
How it works
HTML, HyperText Markup Language, describes the structure and content of web pages using elements written as tags, such as headings, paragraphs, links, lists, images and tables. Elements can have attributes like href and src and can be nested into a tree. A document starts with a doctype and has a head for metadata and a body for visible content. Browsers parse it forgivingly into the DOM.
Step-by-step walkthrough
- The document is a tree of nested elements.
- The head holds metadata such as title.
- The body holds visible content.
- Tags like h1 and p mark headings and paragraphs.
- The browser turns the markup into the DOM tree.
Where it is used
Every web page, email template and web application interface uses HTML as its foundation. Search engines, screen readers and browsers rely on correct markup to understand content.
Common pitfall
Missing closing tags, invalid nesting and using elements for appearance instead of meaning cause inconsistent behavior. Skipping alt text on images and a lang attribute harms accessibility and SEO. Inline styles scattered through markup are hard to maintain. Validate markup, use proper elements and keep presentation in CSS.
Where it fits in the course
HTML Basics is topic 2 of 51 in Web Development, rated Beginner. It follows How the Web Works. The next topic is HTML Forms.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Web Development quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Web Development quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is HTML Basics?
Where do people use HTML Basics?
What is the most common mistake with HTML Basics?
What should I learn before this topic?
How can I practice it?
Is HTML Basics hard to learn?
How long does it take to learn HTML Basics?
Which topics are related to HTML Basics?
What should I study after HTML Basics?
Related topics
- How the Web Works (Web Development)
- HTML Forms (Web Development)
- Semantic HTML (Web Development)
- CSS Basics (Web Development)
- Algorithm Basics (Algorithms)
- Command Line Basics (DevOps & Tooling)
- Android Basics (Mobile, Embedded & IoT)