POStudios Forum

The Royal Archives => The Dark Age => Off-Topic => Topic started by: dark-daventry on March 13, 2008, 11:37:14 AM

Title: The Programming Code thread!
Post by: dark-daventry 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!
Title: Re: The HTML/CSS code thread!
Post by: tessspoon on March 13, 2008, 11:51:17 AM
Creating a link is:

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

without the stars.

For example,

Elon CSC (http://www.elon.edu/e-web/academics%3Cbr%20/%3E/elon_college/computing_sciences/)

is

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

without the stars

Title: Re: The HTML/CSS code thread!
Post by: dark-daventry on March 13, 2008, 12:04:32 PM
Thanks. Anyone got any other code?
Title: Re: The HTML/CSS code thread!
Post by: racx_00 on March 13, 2008, 03:29:01 PM
I just have one thing to say... XHTML is so much better than HTML. :P
Title: Re: The HTML/CSS code thread!
Post by: Yonkey on March 13, 2008, 07:13:00 PM
What do you mean by code accepted on this forum?  The BBC tags like [img]?
Title: Re: The HTML/CSS code thread!
Post by: racx_00 on March 16, 2008, 07:28:48 AM
Yes, that's what he means...
Title: Re: The HTML/CSS code thread!
Post by: Tage7 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: (http://www.google.com/)

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:

You can go here (http://docs.simplemachines.org/index.php?topic=57) 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 (http://www.lissaexplains.com/basics.shtml) website explains things easily. It's built for kids anyway.
Title: Re: The HTML/CSS code thread!
Post by: racx_00 on March 21, 2008, 04:58:08 AM
I prefer xhtml over html these days.
Title: Re: The HTML/CSS code thread!
Post by: Tage7 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.
Title: Re: The HTML/CSS code thread!
Post by: racx_00 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.
Title: Re: The HTML/CSS code thread!
Post by: 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.
Title: Re: The HTML/CSS code thread!
Post by: Tage7 on March 22, 2008, 10:25:56 AM
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
Title: Re: The HTML/CSS code thread!
Post by: 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.
Title: Re: The HTML/CSS code thread!
Post by: dark-daventry 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!
Title: Re: The HTML/CSS code thread!
Post by: tessspoon 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.
Title: Re: The Programming Code thread!
Post by: Yonkey on March 25, 2008, 04:48:43 PM
*renames thread XD*
Title: Re: The HTML/CSS code thread!
Post by: Elessar on March 26, 2008, 02:59:37 PM
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 (http://www.chami.com/html-kit/) from chami.com (http://www.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.)
Title: Re: The Programming Code thread!
Post by: Dangling 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
Title: Re: The Programming Code thread!
Post by: awesomeasapossum 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!)
Title: Re: The Programming Code thread!
Post by: racx_00 on April 09, 2008, 04:02:48 AM
Image maps are easy if you have Dreamweaver.