0% found this document useful (0 votes)
10 views5 pages

HTML Basics: Structure, Forms, and Media

HTML (HyperText Markup Language) is the standard markup language for web pages, utilizing elements like <html>, <head>, and <body>. It emphasizes the use of semantic elements for accessibility, proper form handling, and embedding media. The document also provides examples of common HTML structures and best practices for responsive design.

Uploaded by

SRITHAR S
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views5 pages

HTML Basics: Structure, Forms, and Media

HTML (HyperText Markup Language) is the standard markup language for web pages, utilizing elements like <html>, <head>, and <body>. It emphasizes the use of semantic elements for accessibility, proper form handling, and embedding media. The document also provides examples of common HTML structures and best practices for responsive design.

Uploaded by

SRITHAR S
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

HTML — Page 1

Overview
HTML (HyperText Markup Language) is the standard markup language for creating web pages. It defines
via elements (tags) like <html>, <head>, <body>, <div>, <p>, <a>, <img>, <form>, etc.

Basic structure example:


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Simple Page</title>
</head>
<body>
<h1>Hello, world!</h1>
<p>This is a paragraph.</p>
</body>
</html>
HTML — Page 2
Semantic elements & accessibility
Use semantic tags: <header>, <nav>, <main>, <article>, <section>, <footer>.
Include alt attributes for images and ARIA roles when needed.

Example snippet:
<header>
<h1>My Site</h1>
<nav><a href="#home">Home</a></nav>
</header>
<main role="main">
<article><h2>Article title</h2><p>Content...</p></article>
</main>
HTML — Page 3
Forms & inputs
Forms collect user input. Use labels, placeholders, required attributes, and proper input types.

<form action="/submit" method="post">


<label for="email">Email</label>
<input id="email" name="email" type="email" required>
<button type="submit">Send</button>
</form>
HTML — Page 4
Embedding media & links
Images, audio, video, and external resources.

<img src="[Link]" alt="Description">


<a href="[Link] target="_blank" rel="noopener">External link</a>

Best practices: use responsive images (srcset), prefer modern formats (webp), and include captions.
HTML — Page 5
HTML snippets reference
Common elements:
- Headings: <h1>...<h6>
- Text: <p>, <span>, <strong>, <em>
- Lists: <ul>, <ol>, <li>
- Tables: <table>, <tr>, <td>, <th>
- Media: <img>, <audio>, <video>
- Metadata: <meta>, <link>, <script>

You might also like