EDUCATION
   
 
EDUCATION :- Computer :- HTML TUTORIAL :- Lession 2
 

Q: What are comment tags and why are they useful?

Comment tags are used to include information in your web pages that you do not wish to be displayed by a web browser. Such hidden information can be used to store reminders to you the creator, or comment out old outdated sections of your page. HTML comments are enclosed by the following tags <!-- -->. Your browser will not display anything between these two tags. An example of their usage is show below:

<!--This is the beginning of the e-commerce section.-->

Q: What characters are illegal in a filename?

The safest way to avoid illegal filenames are to use alphanumeric characters (A-Z,a-z,0-9) and/or underscores '_' or dashes '-'. Although some platforms allow the use of spaces and other characters, some don't so it is best to avoid using such characters.

Q: What should I name the file that I create?

Keep filenames, short yet descriptive. HTML documents usually are saved with a .phpl or .php extension.

 

Q: How do I change the background color of my page?

The background color of your page is set in the BODY tag with the BGCOLOR attribute. The BGCOLOR can be specified by a textual description for a small number of colors that are defined in the HTML standard (i.e. 'red','green','blue') or as a hexadecimal RGB triplet (i.e. "#AA99BB","#CC0011","DDEEFF" ).

HTML Code

What it looks like

<BODY BGCOLOR="#AA9944">

Click here to see sample page.

Q: What is hexadecimal?

A lengthly definition could be given, but for most intents and purposes the following short defination should suffice. Hexadecimal represents numbers in Base 16 as opposed to decimal which is Base 10. Normally, we use decimal to represent numbers and use digits 0-9. Hexadecimal uses the numbers 0-9 and the letters A-F to represent the numbers 0-15 (A=10,B=11,...F=15). In decimal representation the number 100 can be thought of as 1*10^2 + 1*10^1 + 1*10^0. This same number could be represented in hexadecimal as 64 which can be thought of as 6*16^1 + 4*16^0.

Q: What is hexadecimal?

A lengthly definition could be given, but for most intents and purposes the following short defination should suffice. Hexadecimal represents numbers in Base 16 as opposed to decimal which is Base 10. Normally, we use decimal to represent numbers and use digits 0-9. Hexadecimal uses the numbers 0-9 and the letters A-F to represent the numbers 0-15 (A=10,B=11,...F=15). In decimal representation the number 100 can be thought of as 1*10^2 + 1*10^1 + 1*10^0. This same number could be represented in hexadecimal as 64 which can be thought of as 6*16^1 + 4*16^0.

Q: How do I put a texture as the background of my page, instead of just a color?

A background image or texture for your page can be set using the BODY tag with the BACKGROUND attribute. An example is shown below:

HTML Code

What it looks like

<BODY BGCOLOR="#AA9944">

Click here to see sample page.