The Most Active and Friendliest
Affiliate Marketing Community Online!

“AdsEmpire”/  Direct Affiliate

more html tricks

crowebird

New Member
affiliate
Here a some more html tricks I know

//Add to favorites
Code:
<a href="javascript:window.external.AddFavorite(document.location, document.title)"><font type=Trebuchet MS" size=2 color="#000000">add to favorties</font></a>

//Pop up windows
Code:
<head>
<script>
function myPopUp(){
tehpop=window.open('http://www.wtflash.com/siteerror404','',CONFIG='HEIGHT=500,WIDTH=500,TOOLBAR=no,MENUBAR=no,SCROLLBARS=no,RESIZABLE=no,LOCATION=no,DIRECTORIES=no,STATUS=no')
}
</script>
</head>

<a href="javascript:myPopUp()"><font type="Trebuchet MS" size=2 color="#000000">link text</font></a>

//Back in history
Code:
javascript:history.go(-1)

//random banner
Code:
<SCRIPT LANGUAGE="JavaScript">
<!--
var ad = 0;
ad = Math.floor(Math.random()*4);
if (ad==0) {
url="http://www.yoursite.com
alt="alt text";
banner="www.yoursite.com/locationOFbanner";
width="425";
height="65";
}
if (ad==1) {
url="http://www.othersite.com
alt="alt text";
banner="www.othersite.com/locationOFbanner";
width="425";
height="65";
}
if (ad==2) {
url="http://www.othersite.com
alt="alt text";
banner="www.othersite.com/locationOFbanner";
width="425";
height="65";
}
if (ad==3) {
url="http://www.othersite.com
alt="alt text";
banner="www.othersite.com/locationOFbanner";
width="425";
height="65";
}
//If one of the banners was at your own site
if (ad==0) {
document.write('<a href=\"' + url + '\" target=\"_top\">');
}
if (ad>=1) {
document.write('<a href=\"' + url + '\" target=\"_blank\">');
}
document.write('<img src=\"' + banner + '\" width=');
document.write(width + ' height=' + height + ' ');
document.write('alt=\"' + alt + '\" border=0></a>');
// -->
</SCRIPT>

cheers,
mike
 
Some basic HTML rules :
DO NOT use <font> tags.
DO NOT use nested tables.
Sure, you may do as you like, but don't get mad when I'll say "I told you so!".
 
Nice!
Thanks to you I'm learning.
I'm looking foreward to seeing next tips.
 
FiveseveN,

"DO NOT use <font> tags.
DO NOT use nested tables."

Will you please explain, in full detail please, why?

I'm truly curious.

Thanks

Paul
 
Fiveseven,

Please take no offense, but that may not be good advice. Ive seen those tags all over the place with no problems. Can you explain your theory?
 
Just because the tags are all over the place, doesn't mean they don't have disadvantages.

Again, I'd humbly like to hear an explanation of why.

Thanks

Paul
 
I'm not gonna give you the whole theory on web standards, but here's WHY :

http://www.webdevtips.com/webdevtips/developer/tips.shtml

<font> tags are now being depreciated and are not guaranteed to be supported in future releases. You should consider making the move to style sheets as soon as possible.

http://www.websitetips.com/html/
http://www.kottke.org/03/08/standards-semantically-correct

And if you have a problem with that, why don't you take it up with the guys from http://w3.org/ ? (This means YOU, Eric!)
 
And by the way Fiveseven, I didnt say I had a problem, I simply said I havent seen a reason why not. I asked you to explain your theory and you did so please stop trying to start conflict.
 
:)

i must agree with FiveseveN.. i hate <font> tags.. css is the best option for texts.. and it's easier to modify and fix.
PS: dudes.. don't fight.. we don't need that here.. :)
 
I don't see why it turned into such a big deal. First off the topic of this area is "webmaster tips and tricks" So i told you any tricks I may know. Im sorry if you don't like the way I do my html but first off Im 15, I probably dont have as much experience as some of you other people, I can use css, but Im just tring to keep it simple...
<font> tags to me arnt hard to use at all and get the job done.
 
Yeah, don't take offense at everyone who disagrees with something you post about. A little, "disagreement" isn't all bad.

This is an internet msg board. Flames happen.

I'd just hope if someone disagrees, then they'd given a reason as to, "why". It took a couple of hours, but at least a link was given.

I now see his point.

<END OF RANT>

Paul
 
I don't want to continue any fight or rant but FiveseN pointed out some things that may not be as known yet to everyone, but certailny are to those wanting to respect standards, HTML standards in particular. And he was right making that points.

For example Not nesting tables has been advocated by w3c since two years ago!!!: http://www.w3.org/2002/03/csslayout-howto

Today, on the site of the WWW consortium is stated loud and clear for any web author that should be interested in that:

FONT tag considered harmful!
http://www.w3.org/MarkUp/#guidelines

Advice for the ones just starting with HTML:
if you want to start the rigth way, learn the standards and apply them. It will benefit you, and everybody else.
 
I must get round to learning stylesheets more. Just breifly, what bit of a stylesheet replaces tables?

I once looked at the source of a yahoo page and they used a lot of nested tables.
 
Implementing as much CSS as you can will eliminate hopefully all font tags and most but not all tables.

This will immediately improve 'Code Bloat Ratio' as well as download times.
 
MI
Back