XHTML (Part 3)

Programming HOW TOs and in-depth guides for programmers of all levels. Programming is an essential skill for hackers, so start learning today!

XHTML (Part 3)

Postby crud3w4re » Tue Jan 30, 2007 10:25 am

There's many useless tags in HTML. Sure, you can use em', but c'mon, are they important? Not really. One of these tags is the <strong> tag, it just alters the text some, try it out. You really don't need to worry about it when you're creating templates, but if you want to use it for your own reasons, then go ahead!

<strong></strong>

<big></big>

<em></em> This tag emphasizes the text, not very important, but useful, yes.

<i> Italics </i> I'm surprised I haven't told you about this one yet. It will create things in italics, it's one of my favorites. :)

<small></small>

<sub></sub> this is "subscript" just a weird way to create new styled text. You can try out all these tags at your leisure, or not, all this is optional.

<sup></sup> does the opposite of the subscript, it looks very interesting, try it out.

That's basically the main formations of text in your HTML document.

There's the <pre> tag, it stands for "preformatting" it's mostly used for displaying code, math equations, stuff like that, you'll see how it looks when you try it out for yourself. It's a nice little tool. I like to just use basic tags, and then I like to touch it up with textual tags later on.

Another useful tag for programming code is the <code> tag, it's great to show people codes. Also, <kbd> keyboard input, <tt> teletype text, <samp> sample text <var> computer variable text, and even <note> can be useful tags. They're not used often, but they're good to know about, if you're serious about HTML.

Again, use at your leisure.

There's even an address tag you can use to display home addy's:

<address> LOL Yeah, it makes your address look better. I don't know.

I know, there's alot of tags that you won't always need, but they're there.

I'll show you how to abbreviate text. ;)

<html>
<body>

<abbr title="United States">US</abbr>
<br>
<abbr title="United Nations">UN</abbr>

</body>
</html>

Cool, eh? You can use this to create text, but then people can see the abbreviation when then have hover their mouse over it, it can work the other way around, as well. <abbr title="US">United States</abbr>

This is a very useful tool.

Want to have some fun with HTML? K.

If your browser supports bi-directional override (bdo) you can do the following:

<bdo dir="rtl">
text
</bdo>

This will create backward text, it's very interesting, try it out!

Now, let's say you want to quote something with HTML, what would you use? A blockquote tag!

<blockquote> this will quote the text in HTML, try this out. If you want to quote someone on something, just use the <blockquote> tag and don't forget to end it by </blockquote> :p There's also a <q> tag for "short quotes," try it out.

Two more interesting tags:

<del> creates some interesting HTML

and

<ins> inserts the correction of the <del> tag, like this:

There was <del>twenty</del> <ins>twelve</ins> eggs on the shelf. This will visibly "scratch" away the "twenty" and will highlight the "twelve" as the new current amount of eggs on the shelf. Nice tags.

It's good to the <acronym> tag before acronyms, search engines will pick up on this, spell checkers will, even browsers, it's just proper HTML is all. Not necessary, but something to think about.

<note>I never saw anyone use "proper" HTML, so don't worry about being all "proper".</note> lol yeah, I know HTML won't work heh

The tags: <em><cite><dfn> <<< definition <strong><samp><kbd><var> are all optional, it might be better to use stylesheets to create richer text rather than use these tags. Your choice, your call.

K. This is the 3rd part, the 4th will be created ...soon. :)
crud3w4re
n00b
 
Posts: 5
Joined: Mon Jan 29, 2007 3:37 pm

Return to ā€œ%sā€ Programming / Scripting Tutorials

Who is online

Users browsing this forum: No registered users and 0 guests

cron