0% found this document useful (0 votes)
2 views

HTML Syntax Overview

This document provides an overview of HTML syntax, including its basic structure, text elements, lists, links, images, tables, forms, semantic elements, containers, meta information, and media elements. It outlines the essential tags and their usage for creating web pages. The document serves as a quick reference for understanding HTML components and their functions.

Uploaded by

trxhck.05
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

HTML Syntax Overview

This document provides an overview of HTML syntax, including its basic structure, text elements, lists, links, images, tables, forms, semantic elements, containers, meta information, and media elements. It outlines the essential tags and their usage for creating web pages. The document serves as a quick reference for understanding HTML components and their functions.

Uploaded by

trxhck.05
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

HTML Syntax Overview

Basic Structure
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<!-- Content goes here -->
</body>
</html>

Text Elements
<h1>Heading 1</h1> to <h6>Heading 6</h6>
<p>Paragraph text</p>
<br> <!-- Line break -->
<hr> <!-- Horizontal rule -->
<strong>Bold text</strong>
<em>Italic text</em>
<mark>Highlighted text</mark>
<sub>Subscript</sub> and <sup>Superscript</sup>
<pre>Preformatted text</pre>

Lists
<ul> <!-- Unordered list -->
<li>Bullet point</li>
</ul>

<ol> <!-- Ordered list -->


<li>Numbered item</li>
</ol>

<dl> <!-- Description list -->


<dt>Term</dt>
<dd>Description</dd>
</dl>

Links and Images


<a href="URL">Link text</a>
<img src="image.jpg" alt="Description">

Tables
<table>
<thead>
<tr>
<th>Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>Cell</td>
</tr>
</tbody>
</table>

Forms
<form action="/submit" method="post">
<input type="text" name="username">
<input type="password" name="password">
<input type="checkbox" name="remember">
<input type="radio" name="choice">
<textarea name="message"></textarea>
<select name="options">
<option value="1">Option 1</option>
</select>
<button type="submit">Submit</button>
</form>

Semantic Elements
<header>Header content</header>
<nav>Navigation</nav>
<main>Main content</main>
<article>Article content</article>
<section>Section content</section>
<aside>Sidebar content</aside>
<footer>Footer content</footer>

Containers and Grouping


<div>Generic container</div>
<span>Inline container</span>

Meta Information
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Page description">
<link rel="stylesheet" href="styles.css">
<script src="script.js"></script>
</head>

Media Elements
<audio src="audio.mp3" controls></audio>
<video src="video.mp4" controls></video>
<iframe src="URL"></iframe>

You might also like