Basic Farking HTML

A short HTML reference

To participate in Photoshop, Audio Edit, and Farktography contests, you will need to know certain HTML codes. Basic HTML is easy to learn, and once you learn it you won't forget it. If you want a more in-depth guide to HTML, click here.

  • To post an image in your comment, use the following code:
 <img src="URLfilename.extension"> 

(Left angle bracket, image, source, quote, URL, name of file, type of file, quote, right angle bracket). Here's an example:

 <img src="https://img.fark.net/images/2007/faq/imagepostsample.jpg">

And here's what the example looks like:

imagepostsample.jpg

  • To post a URL in your comment, use the following code:
 <a href="URLfilename.extension">Text for the URL</a>

(Left angle bracket, anchor, direction to the destination, quote, location/directory, quote, text, closing anchor tag). Here's an example:

 <a href="https://www.fark.com/">It's not news, it's Fark.com</a>

And here's what the example looks like:

It's not news, it's Fark.com

To have the link open in a new window, add target="_top" to the code:

 <a target="_top" href="https://www.fark.com/">It's not news, it's Fark.com</a>

Using a placeholder image

If you've got an image that is Not Safe for Work and want to use a placeholder image for it, use the following HTML:

<a href="URLfilename.extension"> <img src="URLfilenameofyourplaceholderimage.extension"> </a>

Here's an example of the placeholder in action:

nsfwplaceholder.jpg

  • To make parts of your comment bold or italics, use the following code:
  This is in <i>italics</i> and this is in <b>bold</b>

And here's what the example looks like:

  This is in italics and this is in bold

If you want to just experiment with HTML, please make your test posts in this test forum instead of posting in other discussion threads.

HTML assistant buttons

To help you from having to type all of that HTML out, we now have some HTML assistant buttons to help out. The way this works is you select/highlight the text you want to change, then hit the formatting button:

HTML assist button 1 screenshot

Hitting the leftmost "B" button gives:

HTML assist button 1 screenshot

If you stop/hover your mouse over each button for a second or two, some text will pop up telling you what it does:

HTML assist button 1 screenshot

  • Posting links with the HTML assistant buttons:

Links have two parts: the clickable link text, and the URL that the link goes to. The button is smart enough to figure out if the text you highlighted is a URL or not, and will place it in the correct spot in the HTML code automatically. For example, if you highlight the phrase "https://www.fark.com/" and click the "Link" button, you will get:

  <a href="https://www.fark.com/">Link</a>

and then the cursor will move to the word "Link" so you can then replace "Link" with whatever text you want to be clickable. Or, if you highlight the phrase "Here's a cool website" and click the "Link" button, you will get:

  <a href="http://">Here's a cool website</a>

and then the cursor will move to the two slashes so you can type in the rest of the URL.

You'll notice there's actually two link buttons. The second link button with the arrow will make the link open in a new window instead of the same window.

  • Posting images with the HTML assistant buttons:

Simply type in the URL of the image, highlight it, and then click the Image button.

  • Quoting other users' comments with the HTML assistant buttons

The rightmost button that looks like "..." is for quoting parts of other users' comments. Scroll up to a previous user's comment, highlight a section, then go back down and hit the "quote selected" button. It will fill in not only the selected text in italics, but will automatically add the username of the poster for you.

There is also a quote button on the header of every individual message. If you click that button with no text selected, the entirety of the message will be quoted (unless it's huge). If you select some text within that message, only that portion gets quoted (meaning it works just like the normal "quote selected" button in the posting box).

If your text selection spans multiple comments, or is not part of a comment, it will still quote the text but won't put any username in.

  • Finally, if you would rather type all the HTML out by hand and find the assistant buttons annoying, they can be disabled in your myFark profile. Just look for the Preferences section, uncheck the "HTML assistant" option, and click Change Prefs.
  • These buttons also appear when editing the Bio fields in your myFark profile.

If you want to just experiment with HTML, please make your test posts in this test forum instead of posting in other discussion threads.

Known issues/bugs:

  • If you have Javascript disabled in your browser, the buttons will simply not appear at all. Javascript is required for the HTML assistant to work. If you're using, for example, the NoScript plugin for Firefox, you'll need to add an exception.

Uploading images instead of linking them

If you don't have an image host to upload images to, we do now have a way to upload images directly to Fark. They can be used only within Fark itself.

Click the "image" HTML assistant button, then "upload", then select the image file on your system to upload. Make sure the file is under 12 MB in size or it will be silently rejected without an error message (not too graceful, we know, but it's a limitation of the text editor we use). Once it's uploaded, it will then automatically fill in the image URL.