Optimates Optimates

Thursday, February 23, 2006

Using HTML in comments

I've noticed that many people are linking to articles in their comments (which is excellent) and thought I would share some basic HTML for Optimates who haven't been learning HTML from chipmunks (like our esteemed colleague Prometheus). When making a post, you get a handy formatting bar which allows you to create links, and add various emphasis to your text (italics, bold, etc). When posting comments, however, you get no such luxury, but can still type in the actual HTML code to make such things happen. All of the formatting works by placing "tags" around whatever text you want to give a specific format. Tags are bits of text inside carrot brackets placed at the beginning and end of the text in question (although the second tag gets a "/")
For example, in order to make a link out of text in your comment put the following tags around the text you want to be linked:
<a href="http://the-URL-goes-here.com/">This is the link text</a>
The quote marks are important and must go around the URL inside the first tag.

For bold use <b>This text will be bold
</b>
For italics use
<i>This text will be italic</i>
For underline use <u>This text will be underlined</u>

The link tags are particularly useful because they save people having to copy and paste a big messy URL. Plus they are great for pissing off Cato.

5 Comments:

Blogger Chris said...

Artistic license Posca.

23 February, 2006 14:59  
Blogger gcolbath said...

I was going to say that people also make sure that they include the target="_blank" attribute to their links, bot Blogger doesn't allow that!

They only allow the tags for links, bold and italics.

What if we want to format our comments? What then?

Idiots.

I've subbmitted a request that these featured be implemented immediately.

I'm holding my breath.

23 February, 2006 15:25  
Blogger Chris said...

You can actually target specific comments on a post pemalink page if you copy link location from the little time link at the bottom of a given comment. Like this.

23 February, 2006 15:32  
Blogger gcolbath said...

Well, yeah... That's understandable... but I wasn't talking about JavaScript. I'm talking about style elements in span tags, or adding margins to divs to format a layout... or even using blockquotes! I can't even use the pre tag to refer to code when making references! Targeting a blank window in a link tag is far from harmful, and it can be done without JavaScript.

There are lots of sites that restrict JavaScript... my school is one of them. We don't employ JavaScript on any of our servers, not because of malicious intent on our part, but because it's also a way for people to break in.

So, yes... I agree on the JavaScript point... but the restricted HTML that I was referring to is completely harmless.

23 February, 2006 18:08  
Blogger gcolbath said...

Well, this is also true... but Blogger is going through, and filtering out "target" references, aross the board... They could check the "target" reference, and make sure it's an allowed one, and not JavaSript. It would just take a little more effort... but it would greatly increase Blogger's functionality and usability.

24 February, 2006 12:21  

Post a Comment

<< Home