Published by Patrick Mutisya · 14 days ago
The content layer is the middle tier in the three‑layer model of website authoring. It is where the actual text, images, tables, lists and other information that the visitor will read or interact with are entered. Unlike the presentation layer (which controls visual style) and the behaviour layer (which adds interactivity), the content layer defines the logical structure and meaning of the page.
| Element | Purpose | Example |
|---|---|---|
| <h1>–<h6> | Define headings and sub‑headings to create a logical hierarchy. | <h1>Main Title</h1> |
| <p> | Paragraph – the basic block of text. | <p>This is a paragraph of content.</p> |
| <ul> & <ol> | Unordered (bulleted) and ordered (numbered) lists for grouping items. | <ul><li>Item 1</li><li>Item 2</li></ul> |
| <li> | List item – used inside <ul> or <ol>. | <li>First point</li> |
| <table> | Organise data in rows and columns. | <table>…</table> |
| <a> | Create hyperlinks to other pages or resources. | <a href="https://www.example.com">Visit Example</a> |
| <img> | Embed images (alternative text provided for accessibility). | <img src="photo.jpg" alt="Description"> |
| <section> & <article> | Semantic containers for related content blocks. | <section>…</section> |
| <nav> | Identify navigation links. | <nav>…</nav> |
Headings (<h1>–<h6>) establish a clear outline. A typical page might start with a single <h1> for the main title, followed by <h2> for major sections, and <h3> for subsections. Using <section> or <article> elements groups related headings and content, improving readability and SEO.
Lists are ideal for step‑by‑step instructions, feature bullet points, or ordered procedures. Tables are best for presenting tabular data such as schedules, price lists, or comparison charts. Both structures keep the content logical and accessible.
Hyperlinks (<a>) connect the page to other resources. The href attribute holds the target URL, while the link text should be descriptive. Images (<img>) are placed within the content layer, and the alt attribute provides a text alternative for users who cannot see the image.
<h1> per page and follow a logical heading order.alt text for every image to support accessibility.