---
url: https://docs.artemsemkin.com/velum/html/pages/how-a-page-is-built.md
description: >-
  Find your way around a page file, from its head to its regions, sections and
  components.
---

# How a page is built

Every page is one complete HTML file: a head that is the same on every page, then three regions. Knowing which part is which tells you what you can edit freely and what a script depends on.

## How to access

**Any page of the HTML folder, opened in your editor**

```html
<head>…</head>
<body>
  <header data-arts-ajax-region="header">…the header and the burger menu…</header>
  <main id="page-wrapper" class="page-wrapper" data-arts-ajax-region="main" data-bs-theme="light">
    <div id="page-wrapper__content" class="page-wrapper__content">
      <section>…</section>
      <section>…</section>
    </div>
  </main>
  <footer data-arts-ajax-region="footer">…</footer>
</body>
```

## The head

Every page loads the same files in the same order. The ones marked yours are where your changes go; an update of the template replaces the others.

| Line | What it is | Whose |
| --- | --- | --- |
| `<title>` | The page's title in the browser tab | Yours |
| `<meta name="description">` | The page's description for search results | Yours |
| `<link rel="icon">` | The site icon | Yours |
| `css/vendor.css`, `css/main.css`, `css/components.css` | The grid, the template's styles, the components' styles | The template's |
| `css/fonts.css`, `css/variables.css` | The fonts, and the colours, type and spacing | Yours |
| `css/custom.css` | Your own styles, loaded last so they win | Yours |
| `js/config.js` | The settings every page shares | Yours |
| `js/vendor/…`, `js/manifest.js`, `js/app.js` | The libraries and the template's start-up | The template's |
| `js/features/…` | One line per feature: delete a line to turn it off on that page | The template's files, your choice of lines |
| `js/custom.js` | Your own scripts | Yours |

Keep the head the same on every page. Which feature lines to keep: [Turn a feature off](../settings/turn-a-feature-off).

## The three regions

The `<header>`, the `<main>` and the `<footer>` each carry `data-arts-ajax-region`. With AJAX transitions on, a visit to another page replaces these three regions with the next page's own, while the head stays. That is why each page carries its own header and footer, and why a change to them is made in every page: [Edit every page at once](../get-started/edit-every-page-at-once).

The `data-bs-theme` on `<main>` is the page's scheme. A section can carry its own `data-bs-theme` to differ from the page: [Colours and schemes](../look/colours-and-schemes).

## Sections

The content of a page is a list of `<section>` tags inside `<div id="page-wrapper__content">`, one per part of the page, top to bottom. A section is the unit you move, copy or delete: [Move a section](./move-a-section).

## The notes in the page

Short HTML comments in the page say what a part is and the one thing to know before you edit it. The head's notes say whose each group of lines is; a component's note sits on the line just above it:

```html
<!-- Features: one script each; to turn one off, delete its line from every page -->
…
<!-- Burger menu: an item and its preview picture carry the same data-menu-item number; a new pair takes a number no other item has -->
```

Read the note above a part before you change it. The browser never shows them, and a note you delete changes nothing on the page.

## Components

A part of a page that runs a script is a component: an HTML tag with `data-arts-component-name` and, when it has settings, `data-arts-component-options` holding them as JSON.

```html
<div
  class="accordion js-accordion"
  data-arts-component-name="Accordion"
  data-arts-component-options='{"collapseOthers":true}'
  data-arts-os-animation="true"
  data-arts-component-visibility="hidden"
>
```

Change an option's value and reload the page. Keep the rest as it is:

* the options are JSON in single quotes, so the keys and text values inside keep their double quotes;
* `data-arts-component-visibility="hidden"` is how the component starts: its script shows it when its entrance plays;
* a class that starts with `js-` is what the script looks for, so never rename or remove it.

::: danger
Velum: the options of this Accordion are not valid JSON, so it runs with its defaults.
:::

The browser's console names a mistake it can see, with the tag it found it on: options that are not valid JSON, as above, or a component name that does not exist (`Velum: no component is named "Teams".`). Open it with F12 (Cmd+Option+J in Chrome on a Mac) after an edit that seems to do nothing.

Next: [Add, copy or remove a page](./add-copy-or-remove-a-page).
