This site requires JavaScript, please enable it in your browser!
Greenfoot back

BB Code Markup

Do you want to embed an image, link, youtube video or format the visuals of your posts? You can using a markup language called 'BB code'.

BB Code works using a system of 'tags', which you paste the content between. Posts have a set of links at the bottom to make embedding content easier, but you can also write this manually. This categories the different types of codes you can use.

Embed

These codes allow you to embed different types of content into your posts.

Link

A link to another website is embedded using the [url] tag. The opening tag states the url for the link, whilst between the tags you place the text to appear for the link.

You can find my scenario [url=http://www.greenfoot.org/scenarios/231]here![/url]

You can find my scenario here!

Image

Images are embedded by using the [img] tag. You place an url to the image between them.

I like the default avatar ... [img]http://www.greenfoot.org/images/no_avatar.jpg[/img]

I like the default avatar ...
No avatar

Quote

Sometimes you want to reply to something specific in someone else's post. You want to post what they have said, so you can then post your reply. This can be achieved using the [quote] tag.

[quote=JL235] I really like this, it looks great! [/quote] I agree!

JL235 wrote...

I really like this, it looks great!

I agree!

The above states that you are quoting JL235, using the '=' in the quote tag. This is optional, and you can quote people anonymously without this.

[quote] I really like this, it looks great! [/quote] I agree!

I really like this, it looks great!

I agree!

You can also quote someone using the 'quote' button next to a post.

Code

It's best to show code properly formatted. To do this you insert your Java code between [code] tags.

[code] public AnimatedImage(String fileName, int noFrames, int frameWidth, int frameHeight) { GreenfootImage image = new GreenfootImage( fileName ); this.frameWidth = frameWidth; this.frameHeight = frameHeight; this.noFrames = noFrames; frames = new GreenfootImage[noFrames]; int frame = 0; for (int y = 0; y < image.getHeight()-1; y += frameHeight) { for (int x = 0; x < image.getWidth()-1; x += frameWidth) { frames[frame] = new GreenfootImage( frameWidth, frameHeight ); frames[frame].drawImage( image, -x, -y ); frame++; } } } [/code]

You can insert a small snippet of code, or a big chunk. Insert whatever you feel is appropriate for the post.

List

  • Lists are useful.
  • Can allow you to list points.
  • Can also list other things.
  • The outside of a list uses the [ul] tag.
  • Each item within the list uses the [li] tag.

[ul] [li]Lists are useful.[/li] [li]Can allow you to list points.[/li] [li]Can also list other things.[/li] [li]The outside of a list uses the [ ul ] tag.[/li] [li]Each item within the list uses the [ li ] tag.[/li] [/ul]

YouTube Video

For a YouTube video you need to paste the 'hashcode' for the video between two youtube tags. For example:

[youtube]ZnWGOT5Bd2E[/youtube]

You can find the hash code in the share url for a youtube video, after the '?v=' section.

Style

These codes allow you to style how your posts look.

Bold

To show your text in bold'd text you wrap the text with [b] tags.

This is text is normal, [b]this is in bold![/b]

This is text is normal, this is in bold!

Try not to use too much bold text. Only bold the important bits.

Italic

Italic text is shown using the [i] tag.

This text is normal, [i]but here is some slanted text[/i].

This text is normal, but here is some slanted text.

Underline

If you want to underline your text you use the [u] tag.

[u]This is underlined[/u] and this is not.

This is underlined and this is not.

Strike

A strike pastes a line through the middle of your text. This is performed using the [s] tag.

[s]This is my old text.[/s] Here is a corrected version!

This is my old text.
Here is a corrected version!

Striked text is very useful for correcting a post. You edit your post, strike through the old text and paste the corrected text below.

This allows a reader to see both the old and new text together.

Headers

You can use any of the Gallery headers using the h tags: [h1], [h2], [h3] and [h4]. This displays the header in varying sizes.

[h1]The main title![/h1] [h2]Smaller title[/h2] [h3]Even smaller title ...[/h3] [h4]... and a tiny one here.[/h4]

The main title!

Smaller title

Even smaller title ...

... and a tiny one here.

Edit

When you edit a post, it's usually better to point out that you are pasting new content. This is so people can tell that your post has changed.

You can achieve this using the [edit] tag.

Works fine for me! [edit]I forgot to mention that I tested this on Windows.[/edit]

Works fine for me!
edit: I forgot to mention that I tested this on Windows.

YAY

Have you had a success? You can show this using the [yay] tag.

[yay]It's done, it finally works![/yay]

YAY! It's done, it finally works! \o/

Rant

Want to let off a little steam? You can achieve this using the [rant] tag.

[rant]This bug has taken me so long to fix![/rant]

!AAARGH!! This bug has taken me so long to fix!

Remember that the rant tag is not a license to be rude and aggressive!