A collection of great HTML "One Liners"
--------------------------------------------------------------------------------
You can easily create a scrollable text box with this one line <div> tag. You
can put anything inside the scrollable area. This is a very simple one line
alternative to the iframe.
<div style="padding: 20px; overflow: auto; border: solid 1px black; width:
400px; height: 300px;">
Content goes here
<div >
--------------------------------------------------------------------------------
Use this line to pre-load those mouseover images to avoid browser delay:
<img src="image.gif" alt="" style="display: none;">
--------------------------------------------------------------------------------
Get rid of the IE image toolbar with this one line in the <head> section of your
html:
<meta http-equiv="imagetoolbar" content="no">
--------------------------------------------------------------------------------
Disable the "right click" with the oncontextmenu parameter in your body tag
(this parameter is not W3C standards compliant but it works with most browsers):
<body oncontextmenu="return false">
--------------------------------------------------------------------------------
Disable autocomplete on any input field with the autocomplete parameter in your
input tag:
<input . . . autocomplete="off">
--------------------------------------------------------------------------------
You can tell search robots to index your main page and go no further with this
one line in the <head> section of your html:
<meta name="ROBOTS" content="INDEX,NOFOLLOW">
--------------------------------------------------------------------------------
You do a simple redirect to another page by putting this one line in the <head>
section of your html.
The zero is how many seconds to wait before doing the redirect.
<meta http-equiv="refresh" content="0;URL=http://yourdomain.com/anypage.htm">
--------------------------------------------------------------------------------
You force a page refresh (to keep your content current) putting this one line in
the <head> section of your html.
The 300 is how many seconds to wait before doing the refresh.
<meta http-equiv="refresh" content="300">
--------------------------------------------------------------------------------
If your page does not need to scroll, in certain situations IE may still show
the browser gutter (placeholder for the scrollbar).
Get rid of it with this one Style Sheet line:
html {overflow:auto;}
--------------------------------------------------------------------------------
If you want a multi-line alert box, use JavaScript alert and use "\\n" for a
line break.
alert ('This is line one\\nThis is line two');