Tag Archives: HTML

proper CSS style for HTML table

When using table in HTML, you should use CSS style. Indeed, the old way that consists of setting attributes within the table (and td/tr/th) tag is deprecated. Therefore this old code <table width="400" border="3" cellpadding="5" cellspacing="2"> <tr bgcolor="#DDDDDD"> <td width="100" … Continue reading

Posted in Computer Science | Tagged | Leave a comment

HTML: how to include another HTML file

To include another HTML document within a n HTML document, use this command: <! –#include virtual="temp.xml"–><! –#include virtual="temp.xml"–> the main HTML file should have a shtml extension.

Posted in Computer Science | Tagged | Leave a comment

Differences between Class and ID in CSS style

The key thing is that an ID identifies a specific element within a page and therefore must be unique. Classes mark elements as members of a group and can be used multiple times. So why not always using Class over … Continue reading

Posted in Computer Science | Tagged , | Leave a comment

HTML: How to redirect to another page

  <meta HTTP-EQUIV="REFRESH" content="0; url=http://whatever"> <meta HTTP-EQUIV="REFRESH" content="0; url=http://whatever"> Note the syntax where content=”0; is not a typo. The content field contains both the URL to be redirect to and the delay (in seconds). In general, you may want to … Continue reading

Posted in Computer Science | Tagged | Leave a comment

HTML password protected

Password protecting a website (or a sub directory within a website) can be done easily thanks to two special files called .htaccess and .htpasswd First, in the directory that you want to be protected, copy and paste the following code … Continue reading

Posted in Internet related | Tagged | Leave a comment

How to include HTML within another HTML

To include another HTML document within a n HTML document, use this command: <! –#include virtual=”temp.xml”–> Tip: the main HTML file should have a shtml extension.

Posted in Computer Science | Tagged | Leave a comment

HTML and CSS: differences between Class and ID

In HTML language, an ID identifies a specific element within a page and must be unique, whereas CLASS marks an element as members of a group and can be used multiple times. The question is why not always using Class … Continue reading

Posted in Internet related | Tagged , | Leave a comment

HTML: how to insert HTML code in a verbatim tag <pre>

One issue with verbatim tag in HTML (<pre>) is that any HTML code included within the special characters < and > will be interpreted as HTML code despite the usage of a verbatim environment. So, if you include HTML code … Continue reading

Posted in Internet related | Tagged | 1 Comment