I am I (bridgetester) wrote in lj_userdoc,
I am I
bridgetester
lj_userdoc

Revamp of FAQ 72

I'm posting the old content from FAQ 72 (HTML) here. The overall content hasn't changed much, but the style and length has. I'm still going to work on the new version some, but it's better than it was.

Edit: Anyone know what things are allowed/disallowed in the user bio?


How do I alter the appearance of my text? How do I make text bold, italic or centered?

Text can be altered or formatted with various HTML markup tags. Tags can also be used as descriptive keywords and for specific purposes on LiveJournal, such as the <lj-cut> and <lj user> tags.

HTML, or HyperText Markup Language, is a standardized language for presenting information in a browser. A web server sends text to your browser in response to a request (clicking on a link or entering an address in your browser), and your browser then interprets the HTML markup in that document, presenting it in a human-readable form with links, images, and text embellishments.



General Guidelines


A basic HTML markup tag will look something like <tag>. In many cases, it is necessary to also have a closing tag, </tag>, which tells your browser to stop doing what the opening tag told it to do. A large number of HTML tags instruct 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.

A small number of tags do not need a closing tag; one example is the <img> tag, which inserts an image into the document. These tags generally insert an object, rather than applying formatting to the following text. Tags which do not need a closing tag can be indicated by inserting a space and a forward slash before the last angle bracket, thus: <tag />.

Complex HTML tags include pairs of attributes and values, which define various aspects of the tag. (For example, the different attributes of a <font> tag can specify size, color, font face, and so on.) These pairs will always be of the form attribute="value", with spaces between the tag name and the attribute="value" pairs, and between different pairs, for example:
<tag attribute1="value1" attribute2="value2">
When you have a tag with attribute="value" pairs, the closing tag will still only contain the tag name, and none of the attributes:
<tag attribute1="value1">text being affected</tag>

HTML on LiveJournal


LiveJournal entries allow any of the following HTML tags and 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> <marquee> <nobr> <ol> <option> <p> <pre> <s> <select> <small> <span> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul> <xmp>
LiveJournal comments do not allow form tags such as <form> and <input>, but otherwise allow all tags shown above. Entry subjects, as well as the current mood/music fields, allow only the tags <a> <b> <i> <u> <em> <strong> <cite>.

LiveJournal prohibits scripts, applets, and objects in entries, comments and custom styles.

LiveJournal also has a small number of nonstandard tags, which only work on LiveJournal and follow the same format as standard HTML (consisting of either <tag> or <tag attribute="value">.)


Common Text Effects


There are many useful tags there that can bring your text to life, but we're only going to cover a few of the basics here. If you want to learn more about these tags, or other HTML tags not covered here, you can search for a HTML tutorial using your favorite search engine.

  • Bold: Bold text by surrounding it with <b> and </b> tags. You can place as much text between the beginning <b> and ending </b> tags as you want, and all of it will be bold, even if there are spaces and punctuation included.
    Example: <b>This text is in bold.</b>

  • Italics: Italicize text by surrounding it with <i> and </i> tags. As with the bold tag, you can place as much text between the <i> and </i> tags as you want.

  • Underline: Underline text by surrounding it with <u> and </u> tags. Again, you can place as much text between these tags as you want, and it will all appear underlined.

  • Center: Center a line of text by surrounding it with <center> and </center>. These tags work very much like the tags described above, but you must start the text you would like to center on a separate line.

  • Marquee: Make a segment of text appear to scroll across the screen by surrounding it with <marquee> and </marquee> tags. This tag is not supported by all browsers, and it may even cause some browsers to malfunction. You should enclose marquees in an <lj-cut> tag pair to hide text in a marquee tag.
    Example: <lj-cut><marquee>This text is scrolling across the page.</marquee></lj-cut>

  • Pre-formatted text: HTML treats multiple spaces as a single space, to allow formatting in the source code that doesn't need to apply to the page you see in the browser. Because of this, if you type multiple spaces into one part of an entry, it will appear as though you had only typed one. Enclosing text in <pre> and </pre> tags will tell the browser to display it as it was entered, including multiple spaces. To simply have text appear in a mono-spaced font, wrap it in <code> and </code> tags.

  • changing the size, color, and font of certain words (using font and span)
  • adding a link to another journal or another web site
  • adding images

It is possible to apply multiple HTML tags to the same text: <b><i><u>This text</u></i></b> will appear simultaneously bold, italic, and underlined, thus: This text. When you do this, 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.


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 Rich Text Editor


The Rich Text editor allows you to use many of the features of HTML without entering the code manually. If you enter HTML code in the Rich Text editor, it will appear as the code itself; for example, <b> will appear in your entry as <b>, and will not make the following text bold. The Rich Text editor is only available when composing a new entry; it is not available for editing existing entries or for writing comments. Also, the Rich Text editor relies on JavaScript, and is therefore not supported in all browsers.


Using a Downloadable Client


Most downloadable clients include the ability to add markup to your text, and some allow you to preview that markup before you post it. Some clients also have WYSIWYG editors, similar to LiveJournal's Rich Text editor, which can allow you to format your entry without entering the code manually. For more information on your preferred client, consult its documentation or its menu options.


Troubleshooting


LiveJournal uses an HTML cleaner on all entries, comments, and journal styles, which looks for invalid or harmful HTML. If there is a problem with your HTML (for example, if you type <tag="value"> instead of <tag attribute="value">), you will receive an error or your journal or Friends page may suddenly display incorrectly or require you to scroll. If this happens, you will need to find and fix the problem with your HTML code.

Please note that detailed HTML assistance is outside the realm of LiveJournal Support. Instead, you should use your favorite search engine to find an HTML tutorial. Also, you can find one-on-one help by posting in an unofficial LiveJournal community that helps people with HTML or journal customization.
Tags: cat-entries, faq72, status-resolved
Subscribe
  • Post a new comment

    Error

    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 2 comments