HTML (HyperText Markup Language) is the foundation of web development. It uses tags to define content structure. Here's a quick guide:
Basic Structure
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>Heading</h1>
<p>Paragraph text.</p>
</body>
</html>
Common Tags
<html>
: Root element (Root element)<head>
: Metadata container (Metadata container)<title>
: Page title (Page title)<body>
: Visible content area (Visible content area)<h1>
to<h6>
: Headings (Headings)<p>
: Paragraphs (Paragraphs)
Attributes
Add properties to tags like:
<a href="/en/tutorials/html_intro" target="_blank">Intro Link</a>
<img src="https://cloud-image.ullrai.com/q/html_syntax_structure/" alt="HTML Syntax Structure"/>
Tips
- Use
<center>
for centering content (Centering content) - Tags are case-insensitive, but best practice is lowercase (Lowercase tags)
- Always include
<meta charset="UTF-8">
in<head>
(UTF-8 meta tag)