XHTML (Part 4)

Programming HOW TOs and in-depth guides for programmers of all levels. Programming is an essential skill for hackers, so start learning today!
Post Reply
Posts: 5
Joined: Mon Jan 29, 2007 3:37 pm

XHTML (Part 4)

Post by crud3w4re » Tue Jan 30, 2007 9:24 pm

There's some codes you can use to create various characters in HTML, I'll list them for you:

First is the non-breaking space, otherwise known as   or   . The name is easier to remember rather than using the number code, but the disadvantage is that not all browsers support the name, but rather just about every browser supports the number code. Don't know what a "non-breaking space" means? That's okay.

A non-breaking space code allows you to create multiple spaces in your HTML, whereas just hitting the space bar multiple will only show up as one space in the browser. Got it? So it's useful if you want to create multiple space, not that interesting, but still, useful? hm. I suggest using the number code. :)

  will do it. Work with it some. There's a similar code of < which will create a "<" in your browser, normally, the "<" is considered a "less than" tag in HTML, so your browser won't show it. But maybe you want to show it, so what do you do? Just type in < this equals "<" without the quotes. Cool, eh?

There's name codes, but I strong suggest you use the number codes.

The "greater than" code of ">" is >. But really, will you ever use these codes? Who knows. But it will make you loo cool if you have the answer to why some n00b can't use < and > tags in his site hehe That's the point, right?

ampersand time! Do you know what an ampersand is? A "&" the code is & . :D How about a quotation mark?? &#34. And lastly, the apostrophe ' . The name value is &apos; but it does not work in IE browsers, you get what I mean? Learn the numbers.

Some other used characters (but more favorable to me) include the center sign of ¢, this can be created in HTML by using ¢ so you can be like .99¢ and you'll get .99¢ heh. Now, this may come in handy. Some other characters include:

Pound -- £ -- £

Yen -- ¥ -- ¥

Section -- § -- &#167 I'm not sure what this character means, but it looks cool.

Copyright -- © -- ©

registered trademark -- ® -- ®

multiplication -- x -- ×

division -- ÷ -- ÷

There ya go! ;)

There's many other characters that I don't feel writing down code for code, so you may view it here:


Bookmark it and use it when need-be. :)

Moving on ...

Want to create hyperlinks? K. If the page is in the same site, then just use the HTML code <a href="index.html">text here</a> that's how it's done. Quite simple, eh? If you want to create an outside link, just use the tag <a href=http://www.microshit.com/>text here</a> there ya go, now you can make all the links your hearts desire!

How about an image ...as a link?

Ohh image, okay. Just use the code <a href="index.html"> this will define the link from the image that you'll be using.
<img border="0" source="image.jpg" width="65" height="38">
this tag above is the image you'll be using, and also, you can define the table in this way.
Always close such things with the "</a>" tag. This will create an image and a border around it, the second line was the border values, you can alter the numbers to make it look differently. Check it out for yourself! The table is optional.

The <a> tag (anchor) is the gateway to other pages, that's why it's used when creating HTML links. It can point to a page, a sound, an image, a movie, etc. The syntax for a basic link is <a href="url">text here</a> the "href" attribute is used to address the document to link to. So, a link can look like:

<a href="http://www.google.com/">Google</a> ;)

You can use this tag to define where the document will be opened:

For example, opening a new browser window:

<a href="http://www.google.com/"
target="_blank">Google</a> this will create a new window.

Part 5 will be next


how are my tutz so far? I break them up to keep n00bs focused, digest each part.

Post Reply