Basic HTML Terminology
HTML (HyperText Markup Language)
The standard language used to create and design web pages.
1. Tags
HTML is made up of tags. Tags are keywords wrapped in angle brackets, like <p>, <h1>, or <div>. Tags
usually come in pairs: <p> (opening tag) and </p> (closing tag).
2. Elements
An HTML element includes the opening tag, content, and closing tag. Example:
<p>This is a paragraph.</p>
3. Attributes
Attributes provide extra information about elements. They are added in the opening tag.
Example: <img src='image.jpg' alt='My Image' width='300'>
4. HTML Document Structure
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>Heading</h1>
<p>Paragraph</p>
</body>
</html>
5. Common Tags
Basic HTML Terminology
<h1>-<h6>: Headings
<p>: Paragraph
<a>: Anchor (links)
<img>: Image
<ul>: Unordered list
<ol>: Ordered list
<li>: List item
<div>: Block container
<span>: Inline container
<br>: Line break
6. Nesting
Placing one tag inside another.
Example:
<div>
<p>This is a <strong>nested</strong> tag.</p>
</div>
7. Comments
Used to add notes in code (ignored by browsers).
Example: <!-- This is a comment -->
8. Semantic Tags
Semantic HTML5 tags give meaning to content:
<header>, <footer>, <main>, <section>, <article>, <nav>, <aside>
9. Self-closing Tags
Tags that don't need a closing tag:
<br>, <hr>, <img>, <input>, <meta>, <link>