> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Header and Footer

> Header and Footer elements mark the beginning and end of a document; add, convert, and test these Group-type elements in ABBYY FlexiLayout Studio.

The program uses **Header** and **Footer** elements to detect the beginning and the end of a document. These are [Group](/flexi-capture/fls/template/elements-compound)[elements](/flexi-capture/fls/template/elements-compound) and have all the properties of **Group** elements, but may occur in a FlexiLayout only once.

In the tree of elements, the **Header** element is marked with <img src="https://mintcdn.com/abbyy/fmgRWFNHKYN2MLSg/images/flexi-capture/fls/Header.gif?fit=max&auto=format&n=fmgRWFNHKYN2MLSg&q=85&s=5c5ceee2f3fc696ced059d73b34a953b" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="11" height="14" data-path="images/flexi-capture/fls/Header.gif" /> and the **Footer** element is marked with <img src="https://mintcdn.com/abbyy/fmgRWFNHKYN2MLSg/images/flexi-capture/fls/Footer.gif?fit=max&auto=format&n=fmgRWFNHKYN2MLSg&q=85&s=2298792040529fd197452b86920c53a8" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="11" height="14" data-path="images/flexi-capture/fls/Footer.gif" />. The **Header** and **Footer** elements are located at the top of the tree.

To add a **Header** or **Footer** element, right-click in the FlexiLayout and select Header **/** Footer.

A **Group** element may be converted into a **Header** or **Footer** element by selecting the **Convert to Header** or **Convert to Footer** command on its shortcut menu. You can also convert a **Header** or **Footer** element into a common **Group** element by selecting **Convert to Group** on its shortcut menu.

To test the **Header** and **Footer** elements on a particular page, use the **Test Header** and **Test Footer** commands.

## Related topics

<CardGroup cols={2}>
  <Card title="Multi-page FlexiLayout" icon="sitemap" href="/flexi-capture/fls/template/multipage">
    Build FlexiLayouts for multi-page documents, setting page limits and document-wide search.
  </Card>

  <Card title="Using Header and Footer elements to detect the beginning and the end of a document" icon="heading" href="/flexi-capture/fls/template/header-footer">
    Detect the first and last pages of multi-page documents to speed matching.
  </Card>
</CardGroup>
