Minggu, 13 Juni 2004

Building a Web Page From Scratch

Delete all the html code you have for your web page if you want to start your page from scratch!
To start a web page from scratch with html insert this code:
<html>
<head>

</head>
<body>
</body>
</html>

After you have done this, you can look at the html tips provided at this web page and use them between the
<body>
and
</body>
tags.
I suggest looking at this tip first.
Remember that to make a link, you use this code:
<a href="http://htmltips.blogspot.com">Link</a>
The link will look like this:
Link
Also, you may want to look at the tips about images on this site.
 
Also, to make new lines, look at this tip.
NOTE: Some tips may need to go between the <head>  and </head> . For example, all tips which use meta go in the head.


Hit Counter

If you would like a hit counter on your web page like the one at the bottom of this website, then you will have to e-mail me becuase of technical difficulties... When I respond to the e-mail, I will simply give you html code which you can cut and paste into your site. Also, I will give you instructions on how to optionally edit the code to make the counter look different. If you don't like the counter, you can remove it from your site at any time. If you e-mail me, you will get a valuable html tip!


Have Text Highlighted

This is the code for normal text:

HTML TEXT

It will create this:

HTML TEXT

To have HTML highlighted, change the code to this:

<span style="background-color: #FFFF00">HTML</span> TEXT

It will create this:

HTML TEXT

This html tip will make your page even fancier.

Read more about text formatting here


Senin, 07 Juni 2004

Make Advanced Tables

Here is how to create a basic table, so you will understand the following info.

Now that you've learned that, wouldn't it be nice to have a few handy table html tips?

Here they are:



First, we should already know that

<table style="text-align: left; width: 100%;" border="3"

cellpadding="2">

<tbody>

<tr ="">

<td style="vertical-align: top;">Html Table1<br>

</td>

<td style="vertical-align: top;">Html Table2<br>

</td>

</tr>

<tr>

<td style="vertical-align: top;">Html Table3<br>

</td>

<td style="vertical-align: top;">Html Table4<br>

</td>

</tr>

</tbody>

</table>

<br>


is the code for a table.

And the table will look like this:







Html Table1
Html Table2
Html Table3
Html Table4



I shall also stress that if any code does not work properly when you have cut and pasted it, try putting it into only one line.



Second, let's introduce captions:

<table style="text-align: left; width: 100%;" border="3"

cellpadding="2">

<CAPTION>The Caption</CAPTION>

<tbody>

<tr ="">

<td style="vertical-align: top;">Html Table1<br>

</td>

<td style="vertical-align: top;">Html Table2<br>

</td>

</tr>

<tr>

<td style="vertical-align: top;">Html Table3<br>

</td>

<td style="vertical-align: top;">Html Table4<br>

</td>

</tr>

</tbody>

</table>

<br>


See the change? It causes this:

The Caption
Html Table1
Html Table2
Html Table3
Html Table4



(Remember that you can use these tricks in between the <caption> and </caption> to spice up the caption text)


Kamis, 03 Juni 2004

Weird Tips for Scrolling Banners (Marquees)

Before reading, click here to see how to create a basic marquee.

Now, after you've read that, you are probably dying to get some tricks implanted into these marquees.

See this code? It puts an image resized to a height of 33, a width of 82, and the alternative text: "google picture in a marquee for this html tip so whatever".

<MARQUEE>

Hi There! <IMG SRC="http://www.google.com/images/logo.gif" HEIGHT=33 WIDTH=82

ALT="google picture in a marquee for this html tip so whatever">

</MARQUEE>


If crammed into ONE line, the code creates this:



Hi There! google picture in a marquee for this html tip so whatever



You can also use all types of interesting html inside the <marquee> tags.

So, now we have easily put an image into the marquee.

It takes long, however, for the marquee to scroll across the entire page.

How about we make scroll in just a little part of the page?

An html tip comes to the rescue!:

If we use width=200 we can do this:

<MARQUEE width=200>

Hi There! <IMG SRC="http://www.google.com/images/logo.gif" HEIGHT=33 WIDTH=82

ALT="google picture in a marquee for this html tip so whatever">

</MARQUEE>


If pasted onto ONE line, look at what happens:



Hi There! google picture in a marquee for this html tip so whatever



You can obviously change the number after the width= if you want.

You can even use length= when coding html, too, but I unfortunately won't go over that...

So, now we can make the marquee scroll shorter; with less width.

How about we give you another little tip which will get the marquee going in another direction!

Let's add direction=right to make the marquee scroll the other way:

<MARQUEE width=200 direction=right>

Hi There! <IMG SRC="http://www.google.com/images/logo.gif" HEIGHT=33 WIDTH=82

ALT="google picture in a marquee for this html tip so whatever">

</MARQUEE>


Let's see what happens when we put the code on only one line:



Hi There! google picture in a marquee for this html tip so whatever



Ooooooh...

You can also use direction=left but I don't see a reason.

So, we've used some weird html tips so far.

How about we make the marquee slide, go back and forth...

Why not?

Let's make it go back and forth by adding behavior=alternate:

(Code:)

<MARQUEE width=200 direction=right behavior=alternate>

Hi There! <IMG SRC="http://www.google.com/images/logo.gif" HEIGHT=33 WIDTH=82

ALT="google picture in a marquee for this html tip so whatever">

</MARQUEE>


(Result when inserted onto one line:)



Hi There! google picture in a marquee for this html tip so whatever



You can also use behavior=slide.

A normal marquee uses behavior=scroll.

Yeah, yeah...

Let's make a the marquee go slower.

Let's use scrolldelay!

Look at some code using scrolldelay:

<MARQUEE width=200 direction=right behavior=alternate scrolldelay=500>

Hi There! <IMG SRC="http://www.google.com/images/logo.gif" HEIGHT=33 WIDTH=82

ALT="google picture in a marquee for this html tip so whatever">

</MARQUEE>


If this tip were inserted onto one little line, look at what happens

(Look below for a LONG time and you'll see what happens):



Hi There! google picture in a marquee for this html tip so whatever



Remember you can always change the number in front of scrolldelay=.

So, now we got slower marquees.

What about faster marquees?

Instead of scrolldelay we use scrollamount for this:

Look at a code with scrollamount:

<MARQUEE width=200 direction=right behavior=alternate scrollamount=30>

Hi There! <IMG SRC="http://www.google.com/images/logo.gif" HEIGHT=33 WIDTH=82

ALT="google picture in a marquee for this html tip so whatever">

</MARQUEE>


If compacted onto one line after the code is pasted in, look at what happens:



Hi There! google picture in a marquee for this html tip so whatever



Remember to change the scrollamount= number, and note that you can try to use scrollamount at the same time as scrolldelay!

Finally, let's make the marquee thing loop just once using loop=:

Let's look at the code:

<MARQUEE width=200 direction=right behavior=alternate scrollamount=30 loop=2>

Hi There! <IMG SRC="http://www.google.com/images/logo.gif" HEIGHT=33 WIDTH=82

ALT="google picture in a marquee for this html tip so whatever">

</MARQUEE>


Let's look at the output of this html put in one line:



Hi There! google picture in a marquee for this html tip so whatever



It loops only twice! Oooh... And also remember that this does not work on all browsers.

Oh wait, by the time you're down here it has already looped twice...

Lastly, remember to change the amount of loops to what you want.

So, those are the tips for today!


Selasa, 01 Juni 2004

Creating Numbered Lists

Here is some basic code for this html tip.

<ol>

<li>Item Number 1

<li>Item Number 2

</ol>


It will create a numbered list like this one:

  1. Item Number 1

  2. Item Number 2


Also, you can change the code to this:

<ol type=I>

<li>Item Number 1

<li>Item Number 2

</ol>


And you get the numbers in Roman numerals:

  1. Item Number 1

  2. Item Number 2


You can also change the tip like this:

<ol type=A>

<li>Item Number 1

<li>Item Number 2

</ol>


Which creates letters instead of numbers:

  1. Item Number 1

  2. Item Number 2


Finally, you can change the A or I after the type= and you will get some lowercase roman numerals or letters, instead.

This tip will get the information organized in neat ways.

Also, see this tip on how to make normal bullets.


Create a Little Table

This html tip will allow you to create tables like this one:

Html Table1
Html Table2
Html Table3
Html Table4



The code for that table was:

<table style="text-align: left; width: 100%;" border="3"

cellpadding="2">

<tbody>

<tr ="">

<td style="vertical-align: top;">Html Table1<br>

</td>

<td style="vertical-align: top;">Html Table2<br>

</td>

</tr>

<tr>

<td style="vertical-align: top;">Html Table3<br>

</td>

<td style="vertical-align: top;">Html Table4<br>

</td>

</tr>

</tbody>

</table>

<br>




When inserting the above code, make sure you put the top two lines onto ONE line.

If you would like to add another cell in an existing row, simply put in another

<td style="vertical-align: top;">Html Table2<br>

</td>


in the appropriate location.

If you would like to add a new row, put in a

</tr>

<tr>


in the appropriate location.

Obviously, be sure to change the Html Table text in my example.

You can also fiddle around with the numbers in the code of this html tip, especially stuff in the first line.

This tip can lead to more advanced table formatting.

If you liked this tip, you will probably also like this tip, which is about forms.


Twitter Delicious Facebook Digg Favorites More