Forum Moderators: open
Now, I've been using HTML for a very long time, so I know the major things... but I'm just curious if theres anything interesting in html, or little cool things that can be done, which are not common knowledge...
Anyone have cool tidbits of info about it? trade secrets? :) Spill your beans :)
-Davis
HTML and Browsers [webmasterworld.com]
I think you'll find just about every html tip out there and then some. Grab a comfortable seat, and get ready for information overload.
Welcome to WebmasterWorld!
P.S. Oh, make sure you read this thread to get some tips on what to do while performing all of that research...
Back Problems - Inherent in IT [webmasterworld.com]
Although it is not valid XHTML, you can use <nolayer> to hide elements that don't work in Netscape 4.
Tip: PHP
To save replicating large parts of code that appear on several pages, save the repeated code to a separate file. Then just use PHP to include the code via a single line.
You can also use PHP to create variables, and have a page change depending on the variable. Eg: load a random stylesheet.
Tip: IE-only code
If an element (such as a header or last list item) moves down a line in every browser except IE, the result is text too close. You can force IE to add an extra line too by using this code:
<!--[if IE]><br /><![endif]-->
There is also similar code that does the opposite - allows content to be hidden from IE but shown in other browsers. You can also decide the version of IE. Take a look at the Microsoft web developer site for more information.
Tedsters thread [webmasterworld.com] on this is extremely useful and informative.
div#base div#stage { height:84%; left:10%; top:12% }
div#base>div#stage { height:83.5%; left:10.2%; top:12.3% }
Mozilla reads the css line with > in it but IE doesn't.
<a href="mailto:me@widgets.com?subject=Any Title text you want here&body=body text header here?">Email</a>
It's probably old hat to many but I like it.
This seems to work fine with IE 5.5, Outlook Express and Outlook 2000.
But I have no idea if this works for other Email clients or on other Browsers.
Ta
Limbo
If you are going to use a mailto link then at least protect yourself a little bit by changing parts of the address into html entities.
Otherwise you'll get hammered by every spammer in the world who has a screen scraper/mail bot (i.e. most of them).
Where might a guy (or gal) find out more about these "html entities"?