HTML Technical Documentation
Introduction
HTML (HyperText Markup Language) is the standard language used to create and design webpages. It defines the structure of web content using a system of elements represented by tags. HTML forms the foundation of every website on the internet.
HTML Structure
An HTML document typically consists of the following structure:
<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h1>Main Heading</h1> <p>Paragraph text.</p> </body> </html>
HTML Elements
HTML elements include the start tag, content, and end tag. For example:
<p>This is a paragraph.</p>
Some elements are self-closing, like:
<img src="image.jpg" alt="Image">
HTML Attributes
Attributes provide additional information about HTML elements. They are always included in the opening tag.
<a href="https://example.com">Visit</a>
- href: for links
- src: for image source
- alt: alternative text for images
- id, class: for styling and JS access
HTML Tables
Tables are used to display data in rows and columns.
<table> <tr> <th>Name</th> <th>Age</th> </tr> <tr> <td>Alice</td> <td>23</td> </tr> </table>
HTML Lists
There are three types of lists:
- Ordered List (<ol>): numbered items
- Unordered List (<ul>): bullet points
- Description List (<dl>): terms and descriptions
HTML Forms
Forms collect user input and send it to a server:
<form> <label>Name: <input type="text"></label> <input type="submit" value="Submit"> </form>
HTML Media
HTML supports embedding images, audio, and video:
- <img> — images
- <audio controls></audio> — audio playback
- <video controls></video> — video playback
Reference
To learn more about HTML, refer to these resources: