6.23. Sections

Within an article (or chapter if it is a DocBook XML book like the Installation Guide), you can have sections and subsections. <sect1> is always the highest section and you cannot have two sections of the same level within one another (a section 2 can be created within a section 1, but section 1 has to be closed before another section 1 can be created). The general layout follows:


<sect1 id="s1-uniquename">
  <title>Insert Title Here</title>
  <para>
    Body text goes here.
  </para>


  <sect2 id="s2-uniquename">
    <title>Insert Title Here</title>
    <para>
      Body text goes here.
    </para>

    <sect3 id="s3-uniquename">
      <title>Insert Title Here</title>
      <para>
        Body text goes here.
      </para>

    </sect3>

  </sect2>

</sect1>

If you only need one level of sections in a DocBook article, you can use the section tag. For example:


<section id="sn-uniquename">
  <title>Insert Title Here</title>
  <para>
    Body text goes here.
  </para>
</section>
<section id="sn-anothername">
  <title>Insert Title Here</title>
  <para>
    More body text goes here.
  </para>
</section>