FANDOM


Sectioning

Since HTML was originally designed to describe things like essays, memos, and other lumps of text, it has plenty of elements for doing so (especially as of HTML5). First of all, the whole essay should be put in an <article> element, then each paragraph goes with in it.

<!DOCTYPE html>
<html>
  <head>
    <title>Titled Document</title>
    <meta http-equiv="Content-Type"
      content="text/html; charset=UTF-8" />
  </head>
  <body>
    <article>
      <p>The article tag tells computer programs
      that its content is special, the meat out
      of the page.</p>
      <p>Maybe this way HTML can replace RSS,
      and I'm sure screen-readers will jump to
      this content faster rather than wasting
      the user's time higher in the page.</p>
    </article>
  </body>
</html>
   <article>

The article tag tells computer programs that its content is special, the meat out of the page.

Maybe this way HTML can replace RSS, and I'm sure screen-readers will jump to this content faster rather than wasting the user's time higher in the page.

   </article>


And we can help our digital and disabled friends still more by grouping the headings and paragraphs in sections:

<!DOCTYPE html>
<html>
  <head>
    <title>Titled Document</title>
    <meta http-equiv="Content-Type"
      content="text/html; charset=UTF-8" />
  </head>
  <body>
    <article>
      '"`UNIQ5b06cb632b5af13c-section-00000001-QINU`"'
    </article>
  </body>
</html>
   <article>
     
   </article>


So say you have a picture of a recently groomed dog in your how-to article about grooming. Since your article doesn't actually refer to the picture, it doesn't have to actually be with the text. You can tell this to the client program by putting it in a <figure>.

<!DOCTYPE html>
<html>
  <head>
    <title>Titled Document</title>
    <meta http-equiv="Content-Type"
      content="text/html; charset=UTF-8" />
  </head>
  <body>
    <article>
      '"`UNIQ5b06cb632b5af13c-section-00000003-QINU`"'
    </article>
  </body>
</html>
   <article>
     
   </article>

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.