What is an <article>?
An <article> represents a self-contained piece of
content that could be distributed independently — a blog post, a news
story, or a forum comment.
A living demo — HTML, CSS, and JavaScript working together.
This is a paragraph. HTML wraps content in elements. Each element has an opening tag, optional content, and a closing tag. Tags tell the browser what the content means, not how it looks.
Inline text elements let you mark up words inside a paragraph:
strong importance,
emphasis / stress,
highlighted text,
fine print,
deleted text,
inserted text,
subscript and superscript,
inline code,
keyboard input,
and HTML abbreviations.
"The World Wide Web's markup language has always been HTML."
<p>Hello, world!</p>
href or alt.
The <a> element creates a hyperlink.
The href attribute sets the destination.
The <img> element is self-closing (void element).
The alt attribute is required — it describes the image
for screen readers and when the image fails to load.
<figure> and <figcaption>
associate an image with its caption.
| Technology | Layer | Handles |
|---|---|---|
| HTML | Structure | Content and meaning |
| CSS | Presentation | Colours, fonts, layout |
| JavaScript | Behaviour | Interactivity, logic |
| Each layer should stay in its own file. | ||
A <form> groups controls. The action
attribute is the URL that receives the data; method is
get or post.
The controls attribute adds the browser's built-in player UI.
Embeds another web page or resource inside the current page.
An <article> represents a self-contained piece of
content that could be distributed independently — a blog post, a news
story, or a forum comment.
<details> is a disclosure widget that the browser
makes expandable without any JavaScript. The
<summary> is the visible label.
Some elements have no content and no closing tag:
<br /> — line break<hr /> — thematic break<img /> — image<input /> — form control<meta /> — document metadata<link /> — external resource link
Block elements (div, p,
h1…) start on a new line and take the full available width.
Inline elements (span, a,
strong) flow within surrounding text without breaking the line.