You can format text with certain HTML (HyperText Markup Language) markup tags and LiveJournal-specific markup tags like
<lj-cut> and
<lj user>. Alternatively, you can use the
Visual editor to format your entries, which does not require HTML knowledge.
General HTML Guidelines
A basic HTML markup tag looks like
<tag>; this is an opening tag that tells your browser to start doing something. For instance, HTML tags can tell your browser to apply a certain effect – such as bold, italics, underlining, color, or font size – to the text between the opening tag and the closing tag. Most of the time, this opening tag will need a closing tag,
</tag>, which tells your browser to stop doing what the opening tag told it to do.
Some tags do not need a closing tag, but can be closed by inserting a space and a forward slash before the last angle bracket, thus:
<tag />. These tags generally insert an object, rather than applying formatting to the following text; one example is the
<img> tag, which inserts an image into the document.
Complex HTML tags use pairs of attributes and values to give more formatting information. (For example, the different attributes of a <font> tag can specify size, color, font face, and so on.) They will be formatted
attribute="value"; spaces should separate the tag name and the
attribute="
value" pairs, along with the different pairs. The closing tag will only contain the tag name, and none of the attributes.
<tag attribute1="value1" attribute2="value2"> text to affect </tag>
Common HTML Effects
- Bold: <b>This text is bold</b>. <strong>This text is strongly marked up.</strong>.
- Italics: <i>This text is italicised</i>. <em>This text is emphasized.</em>.
- Underline: <u>This text is underlined</u>.
- Center:
<center>Centered text must start on a separate line.</center>
- <big> and <small>: This text is <big>big</big> and <small>small</small>.
- Multiple HTML Tags: You can also apply multiple HTML tags to the same text. When you use multiple tags, the closing tags should be in reverse order to the opening tags, so that the first closing tag applies to the last opening tag, and so on.
<b><i><u>This text is bold, italic, and underlined</u></i></b>
- Other HTML options: You can also use HTML to change the color, size, and font of your text, link to another journal or website, or add images.
HTML on LiveJournal
- Entries: LiveJournal entries allow the following HTML tags along with some others not mentioned here:
<a> <b> <big> <blockquote> <br> <center> <cite> <code> <dd> <div> <dl> <dt> <em> <font> <form> <h1> <h2> <h3> <hr> <i> <img> <input> <li> <nobr> <ol> <option> <p> <pre> <s> <select> <small> <span> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul> <xmp>
In many cases, the Post an Entry page is set to use the Visual Editor by default. You may need to switch to HTML editing by clicking the HTML tab before you can use HTML to format your entries.
- Comments: LiveJournal comments allow most tags shown above, except for form tags (<form> and <input>) and style attributes.
- User Bio and Community Bio: The User Bio and Community Bio allows many tags shown above, but does not allow the <div> tag, the <span> tag, or CSS. The OpenID Bio does not allow HTML.
- Entry Subjects and Mood/Music: Entry subjects and the current mood/music fields only allow certain tags.
<a> <b> <i> <u> <em> <strong> <cite>
- Banned HTML & Code: LiveJournal prohibits scripts, applets, and objects in all user-provided content, including entries, bios, comments and custom styles.
- <lj-cut> and <lj user> tags: LiveJournal also has a small number of nonstandard tags, which only work on LiveJournal and follow the same format as standard HTML (<tag> or <tag attribute="value">.)
Preview
A Preview button is available for both entries and comments, so if you choose to use HTML, you can use this to preview your work as it would appear when someone views it. Once you preview your entry or comment, you can either submit it as is, or you can edit it in the box provided.
The Visual Editor
The
Visual editor uses JavaScript to add HTML, so you should not type the code manually. In fact, HTML code typed manually into the Visual editor will appear as the code itself; for example, <b> will appear in your entry as <b>, and will not make later text bold. You can use the various buttons along the top of the editor to change how text displays.
The Visual editor is only available for posting and editing entries. It is not available for comments or private messages, and may not work in certain web browsers.
Troubleshooting
LiveJournal uses an HTML cleaner to remove invalid or harmful HTML from your entries, comments, user bio, and journal styles. If the HTML cleaner finds a problem with your HTML or a friend's HTML (for example, if you type <
tag="
value"> instead of <
tag attribute="
value">), you will
receive an error or your journal/Friends page
may suddenly display incorrectly or require you to scroll.
After the HTML problem is fixed, your page will display normally again.
Last Updated:
June 7th, 2022