Lists & formatted text in html


Lists

The first type of list is the unordered list. You can make it using the <ul> tag.

The second type of list is the ordered list. You can make it using the <ol> tag.

  1. It
  2. looks
  3. like
  4. this.

All lists need a few different parts:

  1. A list tag, like <ol>
  2. One or more list item tags, <li>

Formatting

This section will go over a few tags:

Code Tags

Both the <code> and <pre> tags allow you to write out code. The <code> tag allows you to write out code in-line. I have been using it in this website when I write out a tag. The <pre> tag allows you to write out blocks of code. It respects all whitespace, so you can put in tabbed code.

            <!--This is a block of code taken from another spot in this page, formatted in a pre tag.-->
            <p>The second type of list is the ordered list. You can make it using the <code><ol></code> tag.</p>
            <ol>
                <li>It</li>
                <li>looks</li>
                <li>like</li>
                <li>this.</li>
            </ol>
        

Other formatting tags

The <kbd> and <samp> commands both have similar effects to the code tags. The <kbd> tag is used to show keyboard inputs, like ctrl + c. The <samp> tag is used for showing samples of code output, like File not found.