This page provides an overview of HTML structure, common tags, and CSS basics.
HTML (Hypertext Markup Language) is the standard language used to structure content on the web. HTML elements, represented by tags, define the structure and content of a webpage or email. CSS (Cascading Style Sheets) is used to style these HTML elements, allowing you to add colors, fonts, spacing, and more.
An HTML document has a basic structure that includes a head and body:
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>Welcome to HTML</h1>
<p>This is a paragraph of text.</p>
</body>
</html>
This structure includes the following important tags:
<html>: The root of the document, containing all HTML content.<head>: Contains metadata, styles, and the document’s title (which appears on the browser tab).<title>: Sets the title of the document, displayed in the browser tab.<body>: Contains the visible content of the document, including headings, paragraphs, images, and more.Some of the most commonly used HTML tags are:
<h1> to <h6>: Headings, with <h1> being the largest and <h6> the smallest.<p>: Paragraphs, used for blocks of text.<a>: Anchor tags, used for links. Example: <a href="https://example.com">Link</a>.<img>: Image tags, used to embed images. Example: <img src="image.jpg" alt="Description">.<table>: Table tags, used to create tables with rows (<tr>) and cells (<td>).