HTML (HyperText Markup Language) is the standard language used to create web pages. It structures content on the web by using elements, tags, and attributes.
How HTML Works: HTML uses "tags" to structure content. Tags typically come in pairs: an opening tag and a closing tag (e.g., <p> and </p>).
An HTML document consists of a few essential parts:
Basic structure of an HTML document:
My First Web Page
Welcome to My Web Page
This is a basic HTML page.
HTML tags are used to define elements like headings, paragraphs, links, images, and more.
Common HTML tags:
<h1>, <h2>, <h3>, etc.<p><a><img><ul>, <ol>, <li><div>, <section>Example:
Heading 1
This is a paragraph of text.
Click here
HTML elements can have attributes, which provide additional information about an element. For example, the <a> tag uses the href attribute to define the link’s destination.
Common attributes:
href for links.src for images.alt for image descriptions.id for unique identification.class for grouping elements.Example:
Click here
Forms allow users to input data. Learn the various form elements like text inputs, checkboxes, radio buttons, and submit buttons.
Example:
Semantic HTML elements provide meaning to the structure of your web page, making it more accessible and easier to understand.
Common semantic tags:
<header><footer><nav><article><section><aside>Example:
My Website
About Us
Information about the website.
Tables are useful for displaying data in rows and columns. The main table tags are <table>, <tr>, <td>, and <th>.
Example:
| Name | Age |
|---|---|
| John | 30 |
| Alice | 25 |
HTML can embed audio and video content. The <audio> and <video> tags are used for this purpose.
Example:
Learn how to create internal and external links to other pages, resources, or even specific sections within a page.
Example:
Go to Example
Jump to Section 1
Section 1
Content for Section 1.
After learning the basics, practice building simple projects to reinforce your skills: