Main Menu

The Programming Code thread!

Started by dark-daventry, March 13, 2008, 11:37:14 AM

Previous topic - Next topic

dark-daventry

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!
Founder of the (new) Left Handed Alliance Of Left Handed People (LHALHP)

Gay and proud of it!

Avid Adventure Game fan

tessspoon

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


dark-daventry

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

racx_00

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

Yonkey

What do you mean by code accepted on this forum?  The BBC tags like [img]?
"A wish changes nothing. A decision changes everything."

racx_00

Knight of Jarada - Master Mind 8)
Assistant Manager of the TSL Asylum XD

Tage7

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.

racx_00

I prefer xhtml over html these days.
Knight of Jarada - Master Mind 8)
Assistant Manager of the TSL Asylum XD

Tage7

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.

racx_00

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

awesomeasapossum

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!

Tage7

#11
Quote from: awesomeasapossum on March 22, 2008, 10:16:43 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

awesomeasapossum

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!

dark-daventry

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

tessspoon

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.

Yonkey

"A wish changes nothing. A decision changes everything."

Elessar

#16
Quote from: awesomeasapossum 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.

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.)
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

Dangling

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

awesomeasapossum

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!

racx_00

Image maps are easy if you have Dreamweaver.
Knight of Jarada - Master Mind 8)
Assistant Manager of the TSL Asylum XD