Author Topic: The Programming Code thread!  (Read 4473 times)

Offline dark-daventry

  • Phoenix Groupie
  • **********
  • Posts: 5229
  • Gender: Male
  • Nothing is true, everything is permitted
The Programming Code thread!
« on: March 13, 2008, 11:37:14 AM »
This thread is intended to be a resource for HTML/CSS code that is accepted on this forum. I've always had trouble with the URL tag in threads, and I could never remember it when I was told. So I am creating this thread as a resource for all types of code accepted in this forum, and it can be used to get help on coding and basically any type of coding talk you want to have. Please note it is NOT limited strictly to HTML/CSS. So talk away! Start writing up all the code you want!
« Last Edit: March 25, 2008, 04:48:00 PM by Yonkey »
Founder of the (new) Left Handed Alliance Of Left Handed People (LHALHP)

Gay and proud of it!

Avid Adventure Game fan

Offline tessspoon

  • Phoenix Groupie
  • **********
  • Posts: 7481
  • Gender: Female
Re: The HTML/CSS code thread!
« Reply #1 on: March 13, 2008, 11:51:17 AM »
Creating a link is:

[*url=url*]name[/url]

without the stars.

For example,

Elon CSC

is

[*url=http://www.elon.edu/e-web/academics
/elon_college/computing_sciences/*]Elon[/url]

without the stars

Offline dark-daventry

  • Phoenix Groupie
  • **********
  • Posts: 5229
  • Gender: Male
  • Nothing is true, everything is permitted
Re: The HTML/CSS code thread!
« Reply #2 on: March 13, 2008, 12:04:32 PM »
Thanks. Anyone got any other code?
Founder of the (new) Left Handed Alliance Of Left Handed People (LHALHP)

Gay and proud of it!

Avid Adventure Game fan

Offline racx_00

  • Web Staff
  • Phoenix Asylum Escapee
  • ***********
  • Posts: 13758
  • Gender: Male
Re: The HTML/CSS code thread!
« Reply #3 on: March 13, 2008, 03:29:01 PM »
I just have one thing to say... XHTML is so much better than HTML. :P
Knight of Jarada - Master Mind 8)
Assistant Manager of the TSL Asylum XD

Offline Yonkey

  • Phoenix Honour Guard
  • ************
  • Posts: 18427
  • Gender: Male
  • Nothing ventured, nothing gained
Re: The HTML/CSS code thread!
« Reply #4 on: March 13, 2008, 07:13:00 PM »
What do you mean by code accepted on this forum?  The BBC tags like [img]?
"A wish changes nothing. A decision changes everything."

Offline racx_00

  • Web Staff
  • Phoenix Asylum Escapee
  • ***********
  • Posts: 13758
  • Gender: Male
Re: The HTML/CSS code thread!
« Reply #5 on: March 16, 2008, 07:28:48 AM »
Yes, that's what he means...
Knight of Jarada - Master Mind 8)
Assistant Manager of the TSL Asylum XD

Offline Tage7

  • Beta Tester
  • Powerful Wizard
  • ******
  • Posts: 809
  • Gender: Male
Re: The HTML/CSS code thread!
« Reply #6 on: March 20, 2008, 08:29:51 PM »
I think the only one people will be really interested in is what tessspoon posted, but, to elaborate, you can put anything you want inside the [url][/url] tag.

For instance, you can put a suffer icon inside it like so:
[url=http://www.google.com/]:suffer:[/url]
and it will become this:
:suffer:

That might not be so useful, but, if you have caught on by now, you can put images within [url][/url] tags as well.

The great thing about a forum like this is that you don't have to physically type in everything yourself if your browser supports JavaScript and has it enabled.

So instead of typing out:
[url=http://www.google.com/]:suffer:[/url]
All you have to do is:
  • Click the suffer icon.
    Your text will now include :suffer: in it.
  • Highlight the :suffer: text.
  • Click the icon.
  • Edit the [url] to point to your web address.
    For instance: [url=http://www.google.com/]

You can go here for a full explanation of all the BBC tags on this forum.

Now, to discuss HTML and CSS.

Technically, BB code is not HTML or CSS. Rather, BB code was a markup language created for security purposes as well as giving more formatting control to the programmer and less formatting control to the users. Also, I can reason why it would be easier to program the use of BBC tags rather than programming certain HTML tags to be allowed.

There are most certainly parallels between BB code and HTML though.

For example, [b][/b] in BBC is equivalent to <b></b> in HTML.

Therefore, if you understand exactly how to use BB code, it is a very short step from there to learning simple HTML.

CSS is very different from both BBC and HTML; however, it has a lot to do with HTML and absolutely nothing to do with BBC.

CSS was created to go along with HTML to make it easier to style uniformly across multiple browsers. It also was created to solve a growing problem of messy HTML code. Styling HTML through HTML tags alone made the code extremely bulky as well as messy and difficult to maintain. Also, developers were using certain HTML tags for styling purposes when their original intent was not meant for styling. Doing this can and will lead to several improper displays of web pages on certain devices or browsers.

I feel it's slightly too complicated to explain how one uses CSS in a thread such as this. If you want to learn more about HTML or CSS, a good resource is http://www.w3schools.com/. For really simple explanations, I have heard this website explains things easily. It's built for kids anyway.

Offline racx_00

  • Web Staff
  • Phoenix Asylum Escapee
  • ***********
  • Posts: 13758
  • Gender: Male
Re: The HTML/CSS code thread!
« Reply #7 on: March 21, 2008, 04:58:08 AM »
I prefer xhtml over html these days.
Knight of Jarada - Master Mind 8)
Assistant Manager of the TSL Asylum XD

Offline Tage7

  • Beta Tester
  • Powerful Wizard
  • ******
  • Posts: 809
  • Gender: Male
Re: The HTML/CSS code thread!
« Reply #8 on: March 21, 2008, 08:48:18 AM »
XHTML is definitely superior to HTML in terms of cleanliness and order. I would have to agree that XHTML is preferable to HTML; however, they're not that different in terms of programming methods. XHTML just has stricter rules for being "correct" code.

For instance, in HTML, people used to always use <p> without ending it with a </p>. That is strictly not allowed in XHTML; however, HTML will accept the </p> tag and render it as well. So, there is no difference between someone that writes one paragraph within the body using HTML or XHTML if they properly close the tag.

One thing that is nice for HTML parsers if you use XHTML is attribute assigning methods for attributes that do not have values (such as selected) and ending HTML tags that technically don't have end tags (such as <br>). In XHTML, the selected attribute is assigned by writing selected="selected" and the <br> tag is closed by writing <br />. These additions make it easier to parse all attributes and tags since it makes them all pretty uniform in coding style with their other attributes or tags.

Offline racx_00

  • Web Staff
  • Phoenix Asylum Escapee
  • ***********
  • Posts: 13758
  • Gender: Male
Re: The HTML/CSS code thread!
« Reply #9 on: March 21, 2008, 05:38:56 PM »
Yeah, exactly. When I first started it was a little hard to get used to but it makes perfect sense.
Knight of Jarada - Master Mind 8)
Assistant Manager of the TSL Asylum XD

Offline awesomeasapossum

  • Crystal Dragon
  • ********
  • Posts: 4104
  • Gender: Male
  • Avert your gazes and watch as he grazes.
Re: The HTML/CSS code thread!
« Reply #10 on: March 22, 2008, 10:16:43 AM »
Isn't the main difference about closing tags? 'Cuz I did that, even in normal HTML.
-Proud member of the Kelsey fan club!
Long live The Silver Lining!

Offline Tage7

  • Beta Tester
  • Powerful Wizard
  • ******
  • Posts: 809
  • Gender: Male
Re: The HTML/CSS code thread!
« Reply #11 on: March 22, 2008, 10:25:56 AM »
Isn't the main difference about closing tags? 'Cuz I did that, even in normal HTML.

Well, stricter attribute assignment rules are probably the main difference between the two. Closing tags is definitely good practice though. ;D

Edit: Well, on second thought, they're pretty much equal in "main difference"ness. :-X
« Last Edit: March 22, 2008, 06:01:45 PM by Tage7 »

Offline awesomeasapossum

  • Crystal Dragon
  • ********
  • Posts: 4104
  • Gender: Male
  • Avert your gazes and watch as he grazes.
Re: The HTML/CSS code thread!
« Reply #12 on: March 22, 2008, 05:46:54 PM »
Yeah, I know some HTML but not a lot. :P Just enough to code and basic-test in DreamWeaver, which is enough for me.
-Proud member of the Kelsey fan club!
Long live The Silver Lining!

Offline dark-daventry

  • Phoenix Groupie
  • **********
  • Posts: 5229
  • Gender: Male
  • Nothing is true, everything is permitted
Re: The HTML/CSS code thread!
« Reply #13 on: March 25, 2008, 10:32:41 AM »
Just to clarify somewhat, this thread is intended for coding talk of ANY kind, so feel free to discuss what you want coding related. It is also intended as a resource for those who want to know the BBC attributes of the forum. Perhaps it can also be used as an emoticon reference as well. It could list the proper codes for emoticons, so people can know how to write them out if they want (I usually write the codes out, rather than clicking on the image to get what I want. It's somewhat easier for me...) But anyway, this thread is for any coding talk of any kind. So just continue on with what you guys were saying... And thank you to Tess for clarifying the url tags!
Founder of the (new) Left Handed Alliance Of Left Handed People (LHALHP)

Gay and proud of it!

Avid Adventure Game fan

Offline tessspoon

  • Phoenix Groupie
  • **********
  • Posts: 7481
  • Gender: Female
Re: The HTML/CSS code thread!
« Reply #14 on: March 25, 2008, 11:18:49 AM »
No Problemo. I had to search for it several times at first when I first started posting before I memorized it, so it's good that it's in a dedicated thread now.

Offline Yonkey

  • Phoenix Honour Guard
  • ************
  • Posts: 18427
  • Gender: Male
  • Nothing ventured, nothing gained
Re: The Programming Code thread!
« Reply #15 on: March 25, 2008, 04:48:43 PM »
*renames thread XD*
"A wish changes nothing. A decision changes everything."

Offline Elessar

  • Beta Tester
  • Powerful Wizard
  • ******
  • Posts: 1308
  • Gender: Male
  • "In the high tongue I am Elessar, the Elfstone."
    • Magic Mirror Games - KQ4 Remake
Re: The HTML/CSS code thread!
« Reply #16 on: March 26, 2008, 02:59:37 PM »
Yeah, I know some HTML but not a lot. :P Just enough to code and basic-test in DreamWeaver, which is enough for me.

An easy way to start using XHTML is to download HTML-Kit from chami.com. It can convert your code to comply with XHTML and CSS standards. So if you want to learn XHTML, you can write some code, then convert to see how close you were. (Or if you're just plain lazy, you can write in HTML and let HTML-Kit do all the real work.)
« Last Edit: April 07, 2008, 10:36:36 PM by Elessar »
All that is gold does not glitter
Not all who wander are lost
The old that is strong does not wither
Deep roots are not touched by the frost

From the ashes a fire shall be woken
A light from the shadows shall spring
Renewed shall be blade that was broken
The crownless again shall be king


Count Elessar of Cumberland

Offline Dangling

  • Royal Heir
  • ****
  • Posts: 253
  • Gender: Male
Re: The Programming Code thread!
« Reply #17 on: April 07, 2008, 10:05:48 PM »
Now how do you make an image map so if you click the left eye of the suffer smiley it takes you to the Strindberg and Helium website, the right eye takes you to the original All Your Base video and the mouth takes you to the Wikipedia page on *gasp* Wikipedia?  XD

Offline awesomeasapossum

  • Crystal Dragon
  • ********
  • Posts: 4104
  • Gender: Male
  • Avert your gazes and watch as he grazes.
Re: The Programming Code thread!
« Reply #18 on: April 08, 2008, 02:12:12 PM »
Image maps are annoying to get perfect. :P
If you have Flash, you can save stuff as image maps though (which in my opinion is cool!)
-Proud member of the Kelsey fan club!
Long live The Silver Lining!

Offline racx_00

  • Web Staff
  • Phoenix Asylum Escapee
  • ***********
  • Posts: 13758
  • Gender: Male
Re: The Programming Code thread!
« Reply #19 on: April 09, 2008, 04:02:48 AM »
Image maps are easy if you have Dreamweaver.
Knight of Jarada - Master Mind 8)
Assistant Manager of the TSL Asylum XD