Instruction
1
You first need to create the table if it does not. This is the attribute of <body>. For this purpose, a tag (end tag required):
β’ <table> - table;
β’ <tr> - string;
β’ <td> the column.
The main extra attributes:
β’ Border β border;
β’ Align β horizontal alignment;
β’ Valign β vertical alignment;
β’ Bordercolor β the border color;
β’ Width β width;
β’ Height β the height.
The syntax of the 2X2 table with no border and a left/right alignment of the content:
<table border= "0">
<tr align="left">
<td>the Contents of the 1st cell</td>
<td> Content of the 2nd cell </td> </tr>
<tr align="right">
<td> the Contents of the 3rd cell </td>
<td> the Contents of the 4th cell </td> </tr>
</table>
β’ <table> - table;
β’ <tr> - string;
β’ <td> the column.
The main extra attributes:
β’ Border β border;
β’ Align β horizontal alignment;
β’ Valign β vertical alignment;
β’ Bordercolor β the border color;
β’ Width β width;
β’ Height β the height.
The syntax of the 2X2 table with no border and a left/right alignment of the content:
<table border= "0">
<tr align="left">
<td>the Contents of the 1st cell</td>
<td> Content of the 2nd cell </td> </tr>
<tr align="right">
<td> the Contents of the 3rd cell </td>
<td> the Contents of the 4th cell </td> </tr>
</table>
2
The picture you need to register after the <td> tag. If you insert the image in the first cell of the table presented above, we get:
<table border= "0">
<tr align="left">
<td><img src="address of image format gif, png, jpeg"></td>
<td> Content of the 2nd cell </td> </tr>
<tr align="right">
<td> the Contents of the 3rd cell </td>
<td> the Contents of the 4th cell </td> </tr>
</table>
Additional attributes:
β’ Width β width;
β’ Height β height;
β’ Alt - alternative text to be displayed to a user if he disabled the feature of viewing images;
β’ Align β horizontal alignment;
β’ Valign β vertical alignment;
β’ Title β the caption of the image.
<table border= "0">
<tr align="left">
<td><img src="address of image format gif, png, jpeg"></td>
<td> Content of the 2nd cell </td> </tr>
<tr align="right">
<td> the Contents of the 3rd cell </td>
<td> the Contents of the 4th cell </td> </tr>
</table>
Additional attributes:
β’ Width β width;
β’ Height β height;
β’ Alt - alternative text to be displayed to a user if he disabled the feature of viewing images;
β’ Align β horizontal alignment;
β’ Valign β vertical alignment;
β’ Title β the caption of the image.
3
The image can be used as a reference. For this purpose it is sufficient to vest in the relevant tag: <a href="page that navigates"><img src="file name.png"></a>
In the context of the table it will look like this:
<table border= "0">
<tr align="left">
<td><a href="stranitsa.html"><img src="kartinka.png"></a></td>
<td> Content of the 2nd cell </td> </tr>
<tr align="right">
<td> the Contents of the 3rd cell </td>
<td> the Contents of the 4th cell </td> </tr>
</table>
In the context of the table it will look like this:
<table border= "0">
<tr align="left">
<td><a href="stranitsa.html"><img src="kartinka.png"></a></td>
<td> Content of the 2nd cell </td> </tr>
<tr align="right">
<td> the Contents of the 3rd cell </td>
<td> the Contents of the 4th cell </td> </tr>
</table>
4
ΠΠΎΠΏΠΎΠ»Π½ΠΈΡΠ΅Π»ΡΠ½ΡΠ΅ Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡΠΈ ΠΈΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΠΉ.
1. Π‘ΠΌΠ΅Π½Π° ΠΊΠ°ΡΡΠΈΠ½ΠΊΠΈ Π½Π° ΡΠ²Π΅Ρ ΠΏΡΠΈ Π½Π°Π²Π΅Π΄Π΅Π½ΠΈΠΈ Π½Π° Π½Π΅Π΅ ΠΌΡΡΡΡ ΠΈ ΠΏΠΎΡΠ»Π΅ ΡΠΌΠ΅Π½Ρ ΠΌΠ΅ΡΡΠΎΠΏΠΎΠ»ΠΎΠΆΠ΅Π½ΠΈΡ ΠΊΡΡΡΠΎΡΠ°:
onMouseOver="this.style.background='#Π½ΠΎΠΌΠ΅Ρ ΡΠ²Π΅ΡΠ°'" onMouseOut="this.style.background='#Π½ΠΎΠΌΠ΅Ρ ΡΠ²Π΅ΡΠ°'"
2. Π‘ΠΌΠ΅Π½Π° ΠΊΠ°ΡΡΠΈΠ½ΠΊΠΈ Π½Π° Π΄ΡΡΠ³ΠΎΠ΅ ΠΈΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΠ΅ ΠΏΡΠΈ Π½Π°Π²Π΅Π΄Π΅Π½ΠΈΠΈ ΠΌΡΡΡΡ:
onmouseover="this.src='images/1.gif'" onmouseout="this.src='images/2.gif'"
3. ΠΡΡΠ°Π²ΠΊΠ° Π²ΡΠ°ΡΠ°ΡΡΠ΅ΠΉΡΡ ΠΊΠ°ΡΡΡΠ΅Π»ΠΈ ΠΈΠ· ΠΊΠ°ΡΡΠΈΠ½ΠΎΠΊ Π² ΡΡΠ΅ΠΉΠΊΡ ΡΠ°Π±Π»ΠΈΡΡ (Π·Π½Π°ΡΠ΅Π½ΠΈΡ ΠΌΠΎΠΆΠ½ΠΎ ΠΌΠ΅Π½ΡΡΡ):
<td align="left">
<BODY onload="Carousel()" background=>
<script type="text/javascript">
// 7 variables to control behavior
var Car_Image_Width=100;
var Car_Image_Height=100;
var Car_Border=true; // true or false
var Car_Border_Color="000000"; Border="0"
var Car_Speed=5;
var Car_Direction=true; // true or false
var Car_NoOfSides=6; // must be 4, 6, 8 or 12
/* array to specify images and optional links.
For 4 sided carousel specify at least 2 images
For 6 sided carousel specify at least 3
For 8 sided carousel specify at least 4
For 12 sided carousel specify at least 6
If Link is not needed keep it ""
*/
Car_Image_Sources=new Array(
"images/1.gif","",
"images/2.gif","",
"images/3.gif","",
"images/4.gif","",
"images/5.gif","",
"images/6.gif",""
// NOTE No comma after last line
);
/***************** DO NOT EDIT BELOW **********************************/
CW_I=new Array(Car_NoOfSides/2+1);C_ClcW=new Array(Car_NoOfSides/2);
C_Coef=new Array(
3*Math.PI/2,0,3*Math.PI/2,11*Math.PI/6,Math.PI/6,3*Math.PI/2,7*Math.PI/4, 0,
Math.PI/4,3*Math.PI/2,5*Math.PI/3,11*Math.PI/6,0,Math.PI/6,Math.PI/3);
var C_CoefOf=Car_NoOfSides==4?0:Car_NoOfSides==6?2:Car_NoOfSides==8?5:9;
C_Pre_Img=new Array(Car_Image_Sources.length);
var C_Angle=Car_Direction?Math.PI/(Car_NoOfSides/2):0,C_CrImg=Car_NoOfSides,C_MaxW,C_TotalW,
C_Stppd=false,i,C_LeftOffset,C_HalfNo=Car_NoOfSides/2;
function Carousel(){
if(document.getElementById){
for(i=0;i<Car_Image_Sources.length;i+=2){
C_Pre_Img[i]=new Image();C_Pre_Img[i].src=Car_Image_Sources[i]}
C_MaxW=Car_Image_Width/Math.sin(Math.PI/Car_NoOfSides)+C_HalfNo+1;
Car_Div=document.getElementById("Carousel");
for(i=0;i<C_HalfNo;i++){
CW_I[i]=document.createElement("img");Car_Div.appendChild(CW_I[i]);
CW_I[i].style.position="absolute";
CW_I[i].style.top=0+"px";
CW_I[i].style.height=Car_Image_Height+"px";
if(Car_Border){
CW_I[i].style.borderStyle="solid";
CW_I[i].style.borderWidth=1+"px";
CW_I[i].style.borderColor=Car_Border_Color}
CW_I[i].src=Car_Image_Sources[2*i];
CW_I[i].lnk=Car_Image_Sources[2*i+1];
CW_I[i].onclick=C_LdLnk;
CW_I[i].onmouseover=C_Stp;
CW_I[i].onmouseout=C_Rstrt}
CarImages()}}
function CarImages(){
if(!C_Stppd){
C_TotalW=0;
for(i=0;i<C_HalfNo;i++){
C_ClcW[i]=Math.round(Math.cos(Math.abs(C_Coef[C_CoefOf+i]+C_Angle))*Car_Image_Width);
C_TotalW+=C_ClcW[i]}
C_LeftOffset=(C_MaxW-C_TotalW)/2;
for(i=0;i<C_HalfNo;i++){
CW_I[i].style.left=C_LeftOffset+"px";
CW_I[i].style.width=C_ClcW[i]+"px";
C_LeftOffset+=C_ClcW[i]}
C_Angle+=Car_Speed/720*Math.PI*(Car_Direction?-1:1);
if((Car_Direction&&C_Angle<=0)||(!Car_Direction&&C_Angle>=Math.PI/C_HalfNo)){
if(C_CrImg==Car_Image_Sources.length)C_CrImg=0;
if(Car_Direction){
CW_I[C_HalfNo]=CW_I[0];
for(i=0;i<C_HalfNo;i++)CW_I[i]=CW_I[i+1];
CW_I[C_HalfNo-1].src=Car_Image_Sources[C_CrImg];
CW_I[C_HalfNo-1].lnk=Car_Image_Sources[C_CrImg+1]}
else{ for(i=C_HalfNo;i>0;i--)CW_I[i]=CW_I[i-1];
CW_I[0]=CW_I[C_HalfNo];
CW_I[0].src=Car_Image_Sources[C_CrImg];
CW_I[0].lnk=Car_Image_Sources[C_CrImg+1]}
C_Angle=Car_Direction?Math.PI/C_HalfNo:0;C_CrImg+=2}}
setTimeout("CarImages()",50)}
function C_LdLnk(){if(this.lnk)window.location.href=this.lnk}
function C_Stp(){this.style.cursor=this.lnk?"pointer":"default";C_Stppd=true;}
function C_Rstrt(){C_Stppd=false}
</script><div id="Carousel" style="position:relative; width:130; height:21">
</td>
1. Π‘ΠΌΠ΅Π½Π° ΠΊΠ°ΡΡΠΈΠ½ΠΊΠΈ Π½Π° ΡΠ²Π΅Ρ ΠΏΡΠΈ Π½Π°Π²Π΅Π΄Π΅Π½ΠΈΠΈ Π½Π° Π½Π΅Π΅ ΠΌΡΡΡΡ ΠΈ ΠΏΠΎΡΠ»Π΅ ΡΠΌΠ΅Π½Ρ ΠΌΠ΅ΡΡΠΎΠΏΠΎΠ»ΠΎΠΆΠ΅Π½ΠΈΡ ΠΊΡΡΡΠΎΡΠ°:
onMouseOver="this.style.background='#Π½ΠΎΠΌΠ΅Ρ ΡΠ²Π΅ΡΠ°'" onMouseOut="this.style.background='#Π½ΠΎΠΌΠ΅Ρ ΡΠ²Π΅ΡΠ°'"
2. Π‘ΠΌΠ΅Π½Π° ΠΊΠ°ΡΡΠΈΠ½ΠΊΠΈ Π½Π° Π΄ΡΡΠ³ΠΎΠ΅ ΠΈΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΠ΅ ΠΏΡΠΈ Π½Π°Π²Π΅Π΄Π΅Π½ΠΈΠΈ ΠΌΡΡΡΡ:
onmouseover="this.src='images/1.gif'" onmouseout="this.src='images/2.gif'"
3. ΠΡΡΠ°Π²ΠΊΠ° Π²ΡΠ°ΡΠ°ΡΡΠ΅ΠΉΡΡ ΠΊΠ°ΡΡΡΠ΅Π»ΠΈ ΠΈΠ· ΠΊΠ°ΡΡΠΈΠ½ΠΎΠΊ Π² ΡΡΠ΅ΠΉΠΊΡ ΡΠ°Π±Π»ΠΈΡΡ (Π·Π½Π°ΡΠ΅Π½ΠΈΡ ΠΌΠΎΠΆΠ½ΠΎ ΠΌΠ΅Π½ΡΡΡ):
<td align="left">
<BODY onload="Carousel()" background=>
<script type="text/javascript">
// 7 variables to control behavior
var Car_Image_Width=100;
var Car_Image_Height=100;
var Car_Border=true; // true or false
var Car_Border_Color="000000"; Border="0"
var Car_Speed=5;
var Car_Direction=true; // true or false
var Car_NoOfSides=6; // must be 4, 6, 8 or 12
/* array to specify images and optional links.
For 4 sided carousel specify at least 2 images
For 6 sided carousel specify at least 3
For 8 sided carousel specify at least 4
For 12 sided carousel specify at least 6
If Link is not needed keep it ""
*/
Car_Image_Sources=new Array(
"images/1.gif","",
"images/2.gif","",
"images/3.gif","",
"images/4.gif","",
"images/5.gif","",
"images/6.gif",""
// NOTE No comma after last line
);
/***************** DO NOT EDIT BELOW **********************************/
CW_I=new Array(Car_NoOfSides/2+1);C_ClcW=new Array(Car_NoOfSides/2);
C_Coef=new Array(
3*Math.PI/2,0,3*Math.PI/2,11*Math.PI/6,Math.PI/6,3*Math.PI/2,7*Math.PI/4, 0,
Math.PI/4,3*Math.PI/2,5*Math.PI/3,11*Math.PI/6,0,Math.PI/6,Math.PI/3);
var C_CoefOf=Car_NoOfSides==4?0:Car_NoOfSides==6?2:Car_NoOfSides==8?5:9;
C_Pre_Img=new Array(Car_Image_Sources.length);
var C_Angle=Car_Direction?Math.PI/(Car_NoOfSides/2):0,C_CrImg=Car_NoOfSides,C_MaxW,C_TotalW,
C_Stppd=false,i,C_LeftOffset,C_HalfNo=Car_NoOfSides/2;
function Carousel(){
if(document.getElementById){
for(i=0;i<Car_Image_Sources.length;i+=2){
C_Pre_Img[i]=new Image();C_Pre_Img[i].src=Car_Image_Sources[i]}
C_MaxW=Car_Image_Width/Math.sin(Math.PI/Car_NoOfSides)+C_HalfNo+1;
Car_Div=document.getElementById("Carousel");
for(i=0;i<C_HalfNo;i++){
CW_I[i]=document.createElement("img");Car_Div.appendChild(CW_I[i]);
CW_I[i].style.position="absolute";
CW_I[i].style.top=0+"px";
CW_I[i].style.height=Car_Image_Height+"px";
if(Car_Border){
CW_I[i].style.borderStyle="solid";
CW_I[i].style.borderWidth=1+"px";
CW_I[i].style.borderColor=Car_Border_Color}
CW_I[i].src=Car_Image_Sources[2*i];
CW_I[i].lnk=Car_Image_Sources[2*i+1];
CW_I[i].onclick=C_LdLnk;
CW_I[i].onmouseover=C_Stp;
CW_I[i].onmouseout=C_Rstrt}
CarImages()}}
function CarImages(){
if(!C_Stppd){
C_TotalW=0;
for(i=0;i<C_HalfNo;i++){
C_ClcW[i]=Math.round(Math.cos(Math.abs(C_Coef[C_CoefOf+i]+C_Angle))*Car_Image_Width);
C_TotalW+=C_ClcW[i]}
C_LeftOffset=(C_MaxW-C_TotalW)/2;
for(i=0;i<C_HalfNo;i++){
CW_I[i].style.left=C_LeftOffset+"px";
CW_I[i].style.width=C_ClcW[i]+"px";
C_LeftOffset+=C_ClcW[i]}
C_Angle+=Car_Speed/720*Math.PI*(Car_Direction?-1:1);
if((Car_Direction&&C_Angle<=0)||(!Car_Direction&&C_Angle>=Math.PI/C_HalfNo)){
if(C_CrImg==Car_Image_Sources.length)C_CrImg=0;
if(Car_Direction){
CW_I[C_HalfNo]=CW_I[0];
for(i=0;i<C_HalfNo;i++)CW_I[i]=CW_I[i+1];
CW_I[C_HalfNo-1].src=Car_Image_Sources[C_CrImg];
CW_I[C_HalfNo-1].lnk=Car_Image_Sources[C_CrImg+1]}
else{ for(i=C_HalfNo;i>0;i--)CW_I[i]=CW_I[i-1];
CW_I[0]=CW_I[C_HalfNo];
CW_I[0].src=Car_Image_Sources[C_CrImg];
CW_I[0].lnk=Car_Image_Sources[C_CrImg+1]}
C_Angle=Car_Direction?Math.PI/C_HalfNo:0;C_CrImg+=2}}
setTimeout("CarImages()",50)}
function C_LdLnk(){if(this.lnk)window.location.href=this.lnk}
function C_Stp(){this.style.cursor=this.lnk?"pointer":"default";C_Stppd=true;}
function C_Rstrt(){C_Stppd=false}
</script><div id="Carousel" style="position:relative; width:130; height:21">
</td>