## HTML on the Archive

### Allowed HTML

`a, abbr, acronym, address, [align], [alt], [axis], b, big, blockquote, br, caption, center, cite, [class], code, col, colgroup, dd, del, details, dfn, div, dl, dt, em, figcaption, figure, h1, h2, h3, h4, h5, h6, [height], hr, [href], i, img, ins, kbd, li, [name], ol, p, pre, q, rp, rt, ruby, s, samp, small, span, [src], strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, [title], tr, tt, u, ul, var, [width]`

### How Do We Format Your HTML?

When you enter HTML into the archive, we do some cleanup on it to make sure that it is safe (so spammers and hackers cannot upload badness) and try and do some basic formatting both for your convenience and for accessibility reasons. Here are the formatting steps we take:

- If you leave a blank line between two paragraphs, we will put paragraph tags in for you around the two paragraphs.
- If you have a single carriage return between two lines of text, we will put in a break tag for you.
- If you have two break tags in a row (<br /><br />) with nothing between them, we will turn that into paragraph tags.
- If you have two blank lines in a row between paragraphs, we will add extra whitespace in for you (with <p>&nbsp;</p>)
- If you have mis-nested tags like this: <em><strong>text!</em></strong> we will fix the mis-nesting (so it would become <em><strong>text!</strong></em>).
- If you have forgotten to close a formatting tag, it will be closed at the end of the paragraph for you.
- If you open a formatting tag in one paragraph and close it several paragraphs later, we will reopen/close it within each paragraph.
- If you have put in some custom HTML (eg a list of items inside a <ul>) and you don't want break tags or paragraphs inserted, just put it all on one line (sorry, this is the inconvenient tradeoff for automatically doing the paragraph/break tags).
- If one bit of your text shows up larger than the rest, probably our formatter couldn't figure out to put paragraph tags around it. You can fix this by manually putting in the paragraph tags around that one bit.

When you edit your HTML after you first put it in, you will see the results of our formatting work, so you can correct any mistakes our formatter might have made. Please note that the best way to get good results is to put in good HTML -- that is how you can be sure your story will look right across various browsers, screen readers, mobile devices, and downloads.

Good HTML means HTML that labels what the text is supposed to be -- so if you have paragraphs, they should be inside paragraph tags, not just separated with break tags. If you have emphasized text, it should be inside em tags. If you have a list of items, each item should be inside list tags. If you don't have a list of items, you shouldn't have list tags. :) (We are putting together a set of more detailed helpful references about this, but this is the basic idea.)

If you find yourself putting in HTML that doesn't mean the right thing, in order to get a particular visual effect, please resist! The work skin feature allows you to apply custom CSS to works, and that lets you make them look just about any way you want them to (and is easier if you are starting from good HTML).

Some specific recommendations:

For headings, use heading tags: `h1, h2, h3, h4, h5, h6`

  - # <h1>Title<h1>

  - ## <h2>Subtitle<h2>

  - ### <h3>Chapter title<h3>

  - #### <h4>Scene title<h4>

  - ##### <h5>Subtitle<h5>

  - ###### <h6>Footnote title<h6>

For emphasis, use emphasis tags `em, strong`

  - <em>Rodney</em> McKay

  - I will <strong>never</strong> understand you!

To quote poetry, phrases or titles use quote tags: `blockquote, q, cite`
  - <blockquote>

    > To quote a block of text

    </blockquote>

  - Use q to <q>To quote a phrase</q>

  - Try cite to cite <cite>a phrase or title</cite>