Show/hide ‘div’ using JavaScript

How to show or hide an element: In order to show or hide an element, manipulate the element’s style property. In most cases, you probably just want to change the element’s display property: Alternatively, if you would still like the element to occupy space (like if you were to hide a table cell), you could change the element’s visibility property instead: … Read more

When to use instead

?

You should keep in mind, that HTML is intended to DESCRIBE the content it contains. So, if you wish to convey a paragraph, then do so. Your comparison isn’t exactly right, though. The more direct comparison would be When to use a <div> instead of a <p>? as both are block level elements. A <span> is inline, much like an … Read more

HTML img scaling

Only set the width or height, and it will scale the other automatically. And yes you can use a percentage. The first part can be done, but requires JavaScript, so might not work for all users.

How to set Helvetica font?

If you want all browsers to use Arial whenever Helvetica is not available, you can always specify Arial as a second choice font. because font-family can use any number or arguments, and it will use the first one in the list that is available

Encode HTML entities in JavaScript

You can use regex to replace any character in a given unicode range with its html entity equivalent. The code would look something like this: This code will replace all characters in the given range (unicode 00A0 – 9999, as well as ampersand, greater & less than) with their html entity equivalents, which is simply &#nnn; where nnn is … Read more

How to download HTTP directory with all files and sub-directories as they appear on the online files/folders list?

Solution: Explanation: It will download all files and subfolders in ddd directory -r : recursively -np : not going to upper directories, like ccc/… -nH : not saving files to hostname folder –cut-dirs=3 : but saving it to ddd by omitting first 3 folders aaa, bbb, ccc -R index.html : excluding index.html files Reference: http://bmwieczorek.wordpress.com/2008/10/01/wget-recursively-download-all-files-from-certain-directory-listed-by-apache/