Everything2
Near Matches
Ignore Exact
Full Text
Everything2

E2 HTML tags : Chapter 4

created by N-Wing

(idea) by N-Wing (3.5 d) (print)   ?   I like it! Fri Feb 11 2000 at 7:27:52

All parts of this HTML guide for Everything 2 include:
(all chapters)   |   Overview/Contents/Index   |   Tags and Starting New Lines   |   Character Formatting   |   Special Characters   |   Lists   |   Giving Credit Where Credit is Due   |   Miscellaneous Tags   |   EOF: Index and Information   |   (Quick Start)


4: Lists

Following are some words that can be used in an interrogative sentence:

  • What
  • if
  • you
  • want
  • to
  • list
  • things?

Sure, you could use lots of <br />, but there is are some HTML tags that are dedicated to creating lists that look nicer than brute forcing it. To create a list, one pair of tags are used once, which specify which type of list to create, and another pair or two are used repeatedly for each item in the list.



4.1: Numbered and Bulleted Lists

Creating a list that has bullets (which are basically dots) or numbers in front of each item requires several steps.

  1. First, decide if bullets or numbers are more appropriate for the given list. (Generally, use bullets when the order is not important, and numbering when it is. I am unable to come up with any examples right now, but maybe you can think of some.)
  2. Second, place the appropriate tag.
    • If you want bullets, like what is in front of this line, put in a <ul>. This stands for unordered list.
    • If you want numbers, like the steps in these instructions have, use the <ol> tag. This means ordered list.
  3. Third, put a <li> before each list item, and a closing </li> after each item.
  4. Finally, close this list with either </ul> or </ol> (the closing tag should match whatever opening tag you used).

To illustrate:
          <ul>
          <li>This is [first]</li>
          <li>This is [second]</li>
          </ul>
produces:

and:
          <ol>
          <li>This is [first]</li>
          <li>This is [second]</li>
          </ol>
produces:

  1. This is first
  2. This is second

Notice that the only difference between an unordered (bulleted) and ordered (numbered) list is only the main opening and closing list tags. (You may also notice that if you nest bulleted items, the bullet may change.)


4.1.1: Numbers/Numerals/Outline

You can also use the <ol> tag to create outlines by adding the type attribute. To do this, instead of a plain <ol> to start an ordered list, use <ol type="n"> instead. The n can be one of several things, as shown below:

  1. <ol type="I">
  2. Please
    1. <ol type="A">
    2. don't
      1. <ol type="1"> (default, if no "type" is given)
      2. sneeze
        1. <ol type="a">
        2. on
          1. <ol type="i">
          2. me.

The types do not have to be in that order; they can be nested multiple times, with any "type" repeated any number of times.

It is also possible to fake resuming a previously-started list by using the start attribute:
          <ol type="I" start="3">
          <li>resume the outline</li>
          </ol>
which displays as:

  1. resume the outline

Note that the start value is not what is should look like (in this case, "III" in Roman numerals), but in Hindu-Arabic numerals ("normal" numbers).



4.2: Definition Lists

Definition lists are rarely used on the web, let alone Everything (except by me, who overuses them), so I'll let you skip to the next chapter, if you so desire.
Since you may not have seen this tag set in use before, I'll first show you an example.

A-wing
Fast but weak.
B-wing
Slow but strong.
N-Wing
That would be me.
Not a "real" Star Wars fighter.
This code produced the above:
          <dl>
          <dt>[A-wing]</dt> <dd>[Fast] but [weak].</dd>
          <dt>[B-wing]</dt> <dd>[Slow] but [strong].</dd>
          <dt>[N-Wing]</dt>
          <dd>That would be me.</dd>
          <dd><em>Not</em> a "real" [Star Wars] fighter.</dd>
          </dl>

To make a definition list, first put in the open and close tags: <dl> and </dl> . For each definition, surround the definition term with <dt> and </dt>, and the definition definition (sic) with <dd> and </dd>. The <dt> and <dd> tags may be repeated multiple times without having the other, but normally (that means, check any dictionary), the term is first, and the definition[s] follow.
I sometimes use these tags to list references I used - I put the reference name and author in the term tags, and longer, more detailed explanation of the source, and my thoughts on it, in the definition tags. This can be used with tags explained in the next chapter.


previous: Chapter 3: Special Characters     |     next: Chapter 5: Giving Credit Where Credit is Due


printable version
chaos

E2 HTML tags : Chapter 5 E2 HTML tags E2 HTML tags : Chapter 3 HTML symbol reference
E2 HTML tags : Chapter 1 E2 HTML tags : Chapter 0 E2 HTML tags : Chapter 2 E2 HTML tags : Chapter 6
Citing internet resources E2 HTML tags : Quick Start E2 HTML tags : Chapter 7 Adventures in the men's bathroom : A female perspective
Table of ASCII Characters HTML ASCII characters nest
ASCII Some special characters A-Wing drug
symbol E2 ASCII art assembly language type
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
Just another sprinkling of indeterminacy
The sexuality and marital status of Jesus
fibromyalgia
Charles Bukowski
Why the willow weeps
How to improve your orgasms
A Tyler By Any Other Name
Monster, we're here
A Man's Salad
Everything Quest
Walking Man 14
penis captivus
Existentialism
Pet Sounds
New Writeups
cryforhelp
Major dictionaries of the world(review)
Glowing Fish
The Uncanny X-Men and the New Teen Titans(thing)
WolfKeeper
Launch loop(idea)
TendoKing
Katana(person)
Wuukiee
Highly ornamental cultivars of brambles still have as many thorns as their wild counterparts(idea)
TheDeadGuy
Editor Log: May 2008(log)
everyday j.Lo
pray do not molest them(thing)
ammie
Bands Who Take Their Names from Eighteenth-century English Poetry and Prose(idea)
shaogo
Under My Thumb(review)
ammie
Rock On(person)
The Custodian
The Dresden Files(thing)
Ouzo
PETA becomes you, a proposed future(fiction)
Ereneta
Stone Soup, Part Two(fiction)
jjen
Sorrier than I ever thought I would be(personal)
locke baron
Moskva class antisubmarine cruiser(thing)
E2 is a by-product of the existence of The Everything Development Company