News:

If you have news or announcements that you would like promoted, post in the "News! News! News!" thread in the Announcements forum, or contact your Guildleader.

Main Menu

Fun with BB Code: Tables and Anchors!

Started by Namae Nai, March 19, 2008, 04:14:06 PM

Previous topic - Next topic

Namae Nai

I've been messing around with BB Code lately and it occurs to me that it might be comething that everyone would like to learn a little bit about, if not for here than for other forums.

Here's how to make a table:

[table][tr][td]One  [/td][td]Two  [/td][td]Three  [/td][/tr]
[tr][td]Four  [/td][td]Five  [/td][td]Six  [/td][/tr]
[tr][td]Seven  [/td][td]Eight  [/td][td]Nine  [/td][/tr]


And it looks like this:

One Two Three
Four Five Six
Seven Eight Nine

Notice how they all line up on the left side? That's because they're actually in an invisible borderless table that aligns them in perfect rows and columns. You can align most anything this way, including pictures and smilies!. Say I want to play a game of tic-tac-toe, using  :fln: instead of X's and :angel: instead of O's.

[table]
[tr][td] :angel:[/td][td]  |  [/td][td] :fln: [/td][td]  |  [/td][td] [/td][/tr]
[tr][td]-----[/td][td]--+--[/td][td]-----[/td][td]--+--[/td][td]-----[/td][/tr]
[tr][td] [/td][td]  |  [/td][td] :fln:[/td][td]  |  [/td][td] :angel:[/td][/tr]
[tr][td]-----[/td][td]--+--[/td][td]-----[/td][td]--+--[/td][td]-----[/td][/tr]
[tr][td] :angel:[/td][td]  |  [/td][td] :fln:[/td][td]  |  [/td][td] :fln:[/td][/tr][/table]



:angel:   |  :fln:    | 
---------+-------------+-----------
   |  :fln:   |  :angel:
---------+-------------+-----------
:angel:   |  :fln:   |  :fln:

The code looks complicated, but it breaks down into rows and data cells. The three tags that form a table are td, tr, and table.


  • td encloses the contents of a cell just like the url tag encloses a link.
  • tr encloses a whole row of cells, and aligns them with the next row you start.
  • table begins and ends a table.
Anyone have any questions?
Namae Nai, Wandering Troubadour, 60,000,000,000$$ reward!

Lyrima

That looks SO cool! :)

Um...definitely  not my thing..but I bet my children would be interested in that!
~^~^~^~^~^~^~^~^~^~^~^
Lyrima - EQ2, ESO, now Baldur's Gate 3
Lark - Storm Trooper SW:TOR
Kiaria - Warden EQ2, ESO
Tira l'Arc - Ranger/Healer HZ/ EQ2, ESO
Athen'a - TankArcher AC