Saturday, October 17, 2009

0

Change Image with useing of Java Script...

<html>
<style>
body {background-Color:darkred;margin-top:0;margin-left:0;margin-right:0;margin-bottom-0;}
a {color:pink;font-size:16;text-decoration:none;font-weight:bold;}
a:hover {color:yellow;font-size:18;text-decoration:none;font-weight:bold;}
</style>
<script language="JavaScript">
function cimage(imagename)
{
img1.src=imagename;
}
</script>
<body>
<table width="100%" align="center">
<tr>
<td align="center" height="50">
<a href="#" onClick="cimage('pics/1.jpg')">1 | </a>
<a href="#" onClick="cimage('pics/2.jpg')">2 | </a>
<a href="#" onClick="cimage('pics/3.jpg')">3 | </a>
<a href="#" onClick="cimage('pics/4.jpg')">4 | </a>
<a href="#" onClick="cimage('pics/5.jpg')">5 | </a>
</td>
</tr>
<tr>
<td align="center">
<img src="pics/1.jpg" id="img1" name="img1" height="520" alt="Salam">
</td>
</tr>
</table>
</body>
</html>
Made By: Muhammad Waqas Shaikh

Wednesday, October 7, 2009

0

Make Easy Gradient Color.

</html>
<style>
body {
background-color:#FFFFFF;
filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='darkred',EndColorStr='pink');
margin: 0px ;
}
h1 {color:white;font-weight:bold;}
a {color:white;font-weight:bold;text-decoration:none;font-size:36}
a:hover {color:yellow;font-weight:bold;text-decoration:underline;font-size:42;}
</style>
<body>
<center><a href="http:\\www.htmlcodings.blogspot.com">Made by Muhammad Waqas Shaikh</a></center>
</body>
</html>

Made by: Muhammad Waqas Shaikh.
0

Make Easy Drop Down Menu.

<html>
<style>
body{margin-top:0;margin-left:0;margin-right:0;margin-bottom:0;background:lightblue;
BACKGROUND-COLOR:DARKRED;
SCROLLBAR-FACE-COLOR:DARKORANGE;
SCROLLBAR-track-COLOR:lightORANGE;
SCROLLBAR-SHADOW-COLOR:DARKRED;
SCROLLBAR-ARROW-COLOR:DARKRED;
SCROLLBAR-3D-COLOR:DARKRED;}
a{color:darkred;text-decoration:none;}
a:hover{color:yellow;font-size:20;}
table{font-size:20;color:white;}
td.menu{background:darkORANGE;color:darkred;font-size:18;}
table.menu
{
position:absolute;
visibility:hidden;
background:DARKRED;
}
</style>
<script language="javascript">
function show(elmnt)
{
document.getElementById(elmnt).style.visibility="visible";

}
function hide(elmnt)
{
document.getElementById(elmnt).style.visibility="hidden";
}
function scolor(elmnt)
{
document.getElementById(elmnt).style.background="green";
}
function ccolor(elmnt)
{
document.getElementById(elmnt).style.background="darkgreen";
}
</script>
<body>
<table width="1000" BORDER="2" BORDERCOLOR="DARKORANGE">
<tr bgcolor="darkRED">
<td onmouseover="show('a')" onmouseout="hide('a')" width="196">
Home<br />
<table class="menu" id="a" width="200">
<tr>
<td bgcolor="darkorange" onmouseover="this.bgColor='orange'" onmouseout="this.bgColor='darkorange'"><a href="www.google.com.pk">Waqas</a></td></tr>
<td bgcolor="darkorange" onmouseover="this.bgColor='orange'" onmouseout="this.bgColor='darkorange'"><a href="www.yahoo.com">Shaikh<a/></td></tr>
<td bgcolor="darkorange" onmouseover="this.bgColor='orange'" onmouseout="this.bgColor='darkorange'"><a href="www.msn.com">Omair</a></td></tr>
<td bgcolor="darkorange" onmouseover="this.bgColor='orange'" onmouseout="this.bgColor='darkorange'"><a href="www.sms.com">Ahsun</a></td></tr>
<td bgcolor="darkorange" onmouseover="this.bgColor='orange'" onmouseout="this.bgColor='darkorange'"><a href="www.download.com">Kamal</a></td></tr>
</table>
</td>
<td onmouseover="show('b')" onmouseout="hide('b')" width="194">
Quran<br />
<table class="menu" id="b" width="200">
<tr>
<td bgcolor="darkorange" onmouseover="this.bgColor='orange'" onmouseout="this.bgColor='darkorange'"><a href="www.alquranic.com">Arabic Quran</a></td></tr>
<td bgcolor="darkorange" onmouseover="this.bgColor='orange'" onmouseout="this.bgColor='darkorange'"><a href="www.alquranic.com">Translation in Urdu</a></td></tr>
<td bgcolor="darkorange" onmouseover="this.bgColor='orange'" onmouseout="this.bgColor='darkorange'"><a href="www.alquranic.com">Translation in Eng</a></td></tr>
<td bgcolor="darkorange" onmouseover="this.bgColor='orange'" onmouseout="this.bgColor='darkorange'"><a href="www.alquranic.com">Audio Quran</a></td></tr>
<td bgcolor="darkorange" onmouseover="this.bgColor='orange'" onmouseout="this.bgColor='darkorange'"><a href="www.alquranic.com">Video Quran</a></td></tr>
</table>
</td>
</tr>
</td>
</tr>
</table>
</body>
</html>

Saturday, June 20, 2009

0

CSS COLORS...



css codings color.

<HTML>
<STYLE>
P {FONT-COLOR: RED; FONT-STYLE: ITALIC; FONT-WEIGHT: BOLD}
</STYLE>
<BODY>
<P>WELCOME TO LEARN CSS.</p>
</body>
</HTML>

Friday, May 22, 2009

0

For....Next Loop In VB.


For...Next Loop.


Use the For...Next statement to run a block of code a specified number of times.

The For statement specifies the counter variable (i), and its start and end values. The Next statement increases the counter variable (i) by one.

Example.


<html>
<body>

<script type="text/vbscript">
for i = 0 to 5
document.write("The number is " & i & "<br />")
next
</script>

</body>
</html>

The Step Keyword.


With the Step keyword, you can increase or decrease the counter variable by the value you specify.

In the example below, the counter variable (i) is INCREASED by two, each time the loop repeats.

For i=2 To 10 Step 2
some code
Next

To decrease the counter variable, you must use a negative Step value. You must specify an end value that is less than the start value.

In the example below, the counter variable (i) is DECREASED by two, each time the loop repeats.

For i=10 To 2 Step -2
some code
Next

Exit a For...Next.


You can exit a For...Next statement with the Exit For keyword.
0

VBScript How To.


VBScript How To


The HTML <script> tag is used to insert a VBScript into an HTML page.

Put a VBScript into an HTML page


The example below shows how to use VBSript to write text on a web page:




Example


<html>
<body>
<script type="text/vbscript">
document.write("Hello World!")
</script>
</body>
</html>

The example below shows how to add HTML tags to the VBScript:

Example ( IE Only )


<html>
<body>
<script type="text/vbscript">
document.write("<h1>Hello World!</h1>")
</script>
</body>
</html>
0

JavaScript Throw Statement.


JavaScript Throw Statement.


The throw statement allows you to create an exception.

The Throw Statement.


The throw statement allows you to create an exception. If you use this statement together with the try...catch statement, you can control program flow and generate accurate error messages.

Syntax.


throw(exception)

The exception can be a string, integer, Boolean or an object.

Note that throw is written in lowercase letters. Using uppercase letters will generate a JavaScript error!

Example.
The example below determines the value of a variable called x. If the value of x is higher than 10, lower than 0, or not a number, we are going to throw an error. The error is then caught by the catch argument and the proper error message is displayed:

Example.


<html>
<body>
<script type="text/javascript">
var x=prompt("Enter a number between 0 and 10:","");
try
{
if(x>10)
{
throw "Err1";
}
else if(x<0)
{
throw "Err2";
}
else if(isNaN(x))
{
throw "Err3";
}
}
catch(er)
{
if(er=="Err1")
{
alert("Error! The value is too high");
}
if(er=="Err2")
{
alert("Error! The value is too low");
}
if(er=="Err3")
{
alert("Error! The value is not a number");
}
}
</script>
</body>
</html>
0

JavaScript For...In Statement.


JavaScript For...In Statement.


The for...in statement loops through the elements of an array or through the properties of an object.

Syntax.


for (variable in object)
{
code to be executed
}
Note: The code in the body of the for...in loop is executed once for each element/property.

Note: The variable argument can be a named variable, an array element, or a property of an object.

Example.
Use the for...in statement to loop through an array:

Example.


<html>
<body>

<script type="text/javascript">
var x;
var mycars = new Array();
mycars[0] = "Saab";
mycars[1] = "Volvo";
mycars[2] = "BMW";

for (x in mycars)
{
document.write(mycars[x] + "<br />");
}
</script>

</body>
</html>

Thursday, May 21, 2009

0

JavaScript Break and Continue Statements.


The break Statement.


The break statement will break the loop and continue executing the code that follows after the loop (if any).

Example.


<html>
<body>
<script type="text/javascript">
var i=0;
for (i=0;i<=10;i++)
{
if (i==3)
{
break;
}
document.write("The number is " + i);
document.write("<br />");
}
</script>
</body>
</html>

The continue Statement.


The continue statement will break the current loop and continue with the next value.

Examplet.


<html>
<body>
<script type="text/javascript">
var i=0
for (i=0;i<=10;i++)
{
if (i==3)
{
continue;
}
document.write("The number is " + i);
document.write("<br />");
}
</script>
</body>
</html>
1

Do while Loop in Java Script (JS).


The do...while Loop.


The do...while loop is a variant of the while loop. This loop will execute the block of code ONCE, and then it will repeat the loop as long as the specified condition is true.

Syntax.


do
{
code to be executed
}
while (var<=endvalue);

Example.
The example below uses a do...while loop. The do...while loop will always be executed at least once, even if the condition is false, because the statements are executed before the condition is tested:

Example.


<html>
<body>
<script type="text/javascript">
var i=0;
do
{
document.write("The number is " + i);
document.write("<br />");
i++;
}
while (i<=5);
</script>
</body>
</html>>
0

JavaScript While Loop.


Loops execute a block of code a specified number of times, or while a specified condition is true.

The while Loop.


The while loop loops through a block of code while a specified condition is true.

Syntax.


while (var<=endvalue)
{
code to be executed
}
Note: The <= could be any comparing statement.

Example.
The example below defines a loop that starts with i=0. The loop will continue to run as long as i is less than, or equal to 5. i will increase by 1 each time the loop runs:

Example.


<html>
<body>
<script type="text/javascript">
var i=0;
while (i<=5)
{
document.write("The number is " + i);
document.write("<br />");
i++;
}
</script>
</body>
</html>>
0

JavaScript For Loop.


Loops execute a block of code a specified number of times, or while a specified condition is true.

JavaScript For Loop


Often when you write code, you want the same block of code to run over and over again in a row. Instead of adding several almost equal lines in a script we can use loops to perform a task like this.

In JavaScript, there are two different kind of loops:

  • for - loops through a block of code a specified number of times.
  • while - loops through a block of code while a specified condition is true.

    The for Loop


    The for loop is used when you know in advance how many times the script should run.

    Syntax.


    for (var=startvalue;var<=endvalue;var=var+increment)
    {
    code to be executed
    }

    Example.


    The example below defines a loop that starts with i=0. The loop will continue to run as long as i is less than, or equal to 5. i will increase by 1 each time the loop runs.

    Note: The increment parameter could also be negative, and the <= could be any comparing statement.

    Example.


    <html>
    <body>
    <script type="text/javascript">
    var i=0;
    for (i=0;i<=5;i++)
    {
    document.write("The number is " + i);
    document.write("<br />");
    }
    </script>
    </body>
    </html>
  • 0

    Make JavaScript Functions.


    JavaScript Functions.


    A function will be executed by an event or by a call to the function.


    JavaScript Functions Defination.


    To keep the browser from executing a script when the page loads, you can put your script into a function.

    A function contains code that will be executed by an event or by a call to the function.

    You may call a function from anywhere within a page (or even from other pages if the function is embedded in an external .js file).

    Functions can be defined both in the <head> and in the <body> section of a document. However, to assure that a function is read/loaded by the browser before it is called, it could be wise to put functions in the <head> section.

    How to Define a Function.


    Syntax.


    function functionname(var1,var2,...,varX)
    {
    some code
    }

    The parameters var1, var2, etc. are variables or values passed into the function. The { and the } defines the start and end of the function.

    Note: A function with no parameters must include the parentheses () after the function name.

    Note: Do not forget about the importance of capitals in JavaScript! The word function must be written in lowercase letters, otherwise a JavaScript error occurs! Also note that you must call a function with the exact same capitals as in the function name.

    JavaScript Function Example.


    <html>
    <head>
    <script type="text/javascript">
    function displaymessage()
    {
    alert("Hello World!");
    }
    </script>
    </head>

    <body>
    <form>
    <input type="button" value="Click me!" onclick="displaymessage()" />
    </form>
    </body>
    </html>


    If the line: alert("Hello world!!") in the example above had not been put within a function, it would have been executed as soon as the line was loaded. Now, the script is not executed before a user hits the input button. The function displaymessage() will be executed if the input button is clicked.

    The return Statement.


    The return statement is used to specify the value that is returned from the function.

    So, functions that are going to return a value must use the return statement.

    The example below returns the product of two numbers (a and b):

    Example.


    <html>
    <head>
    <script type="text/javascript">
    function product(a,b)
    {
    return a*b;
    }
    </script>
    </head>

    <body>
    <script type="text/javascript">
    document.write(product(4,3));
    </script>

    </body>
    </html>

    The Lifetime of JavaScript Variables.


    If you declare a variable within a function, the variable can only be accessed within that function. When you exit the function, the variable is destroyed. These variables are called local variables. You can have local variables with the same name in different functions, because each is recognized only by the function in which it is declared.

    If you declare a variable outside a function, all the functions on your page can access it. The lifetime of these variables starts when they are declared, and ends when the page is closed.
    0

    JavaScript Popup Boxes.


    JavaScript Popup Boxes.


    JavaScript has three kind of popup boxes: Alert box, Confirm box, and Prompt box.



    Alert Box.


    An alert box is often used if you want to make sure information comes through to the user.

    When an alert box pops up, the user will have to click "OK" to proceed.

    Syntax.


    alert("sometext");

    Example.


    <html>
    <head>
    <script type="text/javascript">
    function show_alert()
    {
    alert("I am an alert box!");
    }
    </script>
    </head>
    <body>

    <input type="button" onclick="show_alert()" value="Show alert box" />

    </body>
    </html>

    Confirm Box.


    A confirm box is often used if you want the user to verify or accept something.

    When a confirm box pops up, the user will have to click either "OK" or "Cancel" to proceed.

    If the user clicks "OK", the box returns true. If the user clicks "Cancel", the box returns false.

    Syntax.


    confirm("sometext");

    Example.


    <html>
    <head>
    <script type="text/javascript">
    function show_confirm()
    {
    var r=confirm("Press a button");
    if (r==true)
    {
    document.write("You pressed OK!");
    }
    else
    {
    document.write("You pressed Cancel!");
    }
    }
    </script>
    </head>
    <body>

    <input type="button" onclick="show_confirm()" value="Show confirm box" />

    </body>
    </html>

    Prompt Box.


    A prompt box is often used if you want the user to input a value before entering a page.

    When a prompt box pops up, the user will have to click either "OK" or "Cancel" to proceed after entering an input value.

    If the user clicks "OK" the box returns the input value. If the user clicks "Cancel" the box returns null.

    Syntax.


    prompt("sometext","defaultvalue");

    Example.


    <html>
    <head>
    <script type="text/javascript">
    function show_prompt()
    {
    var name=prompt("Please enter your name","Harry Potter");
    if (name!=null && name!="")
    {
    document.write("Hello " + name + "! How are you today?");
    }
    }
    </script>
    </head>
    <body>

    <input type="button" onclick="show_prompt()" value="Show prompt box" />

    </body>
    </html>

    Wednesday, May 20, 2009

    0

    JavaScript Switch Statement.


    The JavaScript Switch Statement.


    Use the switch statement to select one of many blocks of code to be executed.

    This is how it works: First we have a single expression n (most often a variable), that is evaluated once. The value of the expression is then compared with the values for each case in the structure. If there is a match, the block of code associated with that case is executed. Use break to prevent the code from running into the next case automatically.

    Syntax.


    switch(n)
    {
    case 1:
    execute code block 1
    break;
    case 2:
    execute code block 2
    break;
    default:
    code to be executed if n is different from case 1 and 2
    }

    Example.


    <script type="text/javascript">
    //You will receive a different greeting based
    //on what day it is. Note that Sunday=0,
    //Monday=1, Tuesday=2, etc.

    var d=new Date();
    theDay=d.getDay();
    switch (theDay)
    {
    case 5:
    document.write("Finally Friday");
    break;
    case 6:
    document.write("Super Saturday");
    break;
    case 0:
    document.write("Sleepy Sunday");
    break;
    default:
    document.write("I'm looking forward to this weekend!");
    }
    </script>
    0

    If...Else Statement with Variable.


    Conditional Statements.


    Very often when you write code, you want to perform different actions for different decisions. You can use conditional statements in your code to do this.

    In JavaScript we have the following conditional statements:

  • if statement - use this statement to execute some code only if a specified condition is true
  • if...else statement - use this statement to execute some code if the condition is true and another code if the condition is false
  • if...else if....else statement - use this statement to select one of many blocks of code to be executed
  • switch statement - use this statement to select one of many blocks of code to be executed.

    If Statements.


    Use the if statement to execute some code only if a specified condition is true.

    Syntax.


    if (condition)
    {
    code to be executed if condition is true
    }

    Note that if is written in lowercase letters. Using uppercase letters (IF) will generate a JavaScript error!

    Example.


    <script type="text/javascript">
    //Write a "Good morning" greeting if
    //the time is less than 10

    var d=new Date();
    var time=d.getHours();

    if (time<10)
    {
    document.write("<b>Good morning</b>");
    }
    </script>

    Notice that there is no ..else.. in this syntax. You tell the browser to execute some code only if the specified condition is true.

    If...else Statement
    .


    Use the if....else statement to execute some code if a condition is true and another code if the condition is not true.

    Syntax.


    if (condition)
    {
    code to be executed if condition is true
    }
    else
    {
    code to be executed if condition is not true
    }

    Example.


    <script type="text/javascript">
    //If the time is less than 10, you will get a "Good morning" greeting.
    //Otherwise you will get a "Good day" greeting.

    var d = new Date();
    var time = d.getHours();

    if (time < 10)
    {
    document.write("Good morning!");
    }
    else
    {
    document.write("Good day!");
    }
    </script>

    If...else if...else Statement.


    Use the if....else if...else statement to select one of several blocks of code to be executed.

    Syntax.


    if (condition1)
    {
    code to be executed if condition1 is true
    }
    else if (condition2)
    {
    code to be executed if condition2 is true
    }
    else
    {
    code to be executed if condition1 and condition2 are not true
    }

    Example.


    <script type="text/javascript">
    var d = new Date()
    var time = d.getHours()
    if (time<10)
    {
    document.write("<b>Good morning</b>");
    }
    else if (time>10 && time<16)
    {
    document.write("<b>Good day</b>");
    }
    else
    {
    document.write("<b>Hello World!</b>");
    }
    </script>
  • 0

    Comments in Java Script.


    JavaScript Comments.


    Comments can be added to explain the JavaScript, or to make the code more readable.

    Single line comments start with //.

    The following example uses single line comments to explain the code:

    Example.


    <script type="text/javascript">
    // Write a heading
    document.write("<h1>This is a heading</h1>");
    // Write two paragraphs:
    document.write("<p>This is a paragraph.</p>");
    document.write("<p>This is another paragraph.</p>");
    </script>

    JavaScript Multi-Line Comments.


    Multi line comments start with /* and end with */.

    The following example uses a multi line comment to explain the code:

    Example.


    <script type="text/javascript">
    /*
    The code below will write
    one heading and two paragraphs
    */
    document.write("<h1>This is a heading</h1>");
    document.write("<p>This is a paragraph.</p>");
    document.write("<p>This is another paragraph.</p>");
    </script>

    Using Comments to Prevent Execution.


    In the following example the comment is used to prevent the execution of a single code line (can be suitable for debugging):

    Example.


    <script type="text/javascript">
    //document.write("<h1>This is a heading</h1>");
    document.write("<p>This is a paragraph.</p>");
    document.write("<p>This is another paragraph.</p>");
    </script>

    In the following example the comment is used to prevent the execution of a code block (can be suitable for debugging):

    Example.


    <script type="text/javascript">
    /*
    document.write("<h1>This is a heading</h1>");
    document.write("<p>This is a paragraph.</p>");
    document.write("<p>This is another paragraph.</p>");
    */
    </script>

    Using Comments at the End of a Line.


    In the following example the comment is placed at the end of a code line:

    Example.


    <script type="text/javascript">
    document.write("Hello"); // Write "Hello"
    document.write(" Dolly!"); // Write " Dolly!"
    </script>
    0

    Use of Java Script.


    Definition and Usage.


    The <script> tag is used to define a client-side script, such as a JavaScript.

    The script element either contains scripting statements or it points to an external script file through the src attribute.

    The required type attribute specifies the MIME type of the script.

    Common uses for JavaScript are image manipulation, form validation, and dynamic changes of content.

    Example.


    <html>
    <body>
    <script type="text/javascript">
    document.write("Hello World!")
    </script>
    </body>
    </html>

    Differences Between HTML and XHTML.


    HTML 4 and XHTML deal different with the content inside scripts:

  • In HTML 4, the content type is declared as CDATA, which means that entities will not be parsed.
  • In XHTML, the content type is declared as (#PCDATA), which means that entities will be parsed.
    This means that in XHTML, all special characters should be encoded or all content should be wrapped inside a CDATA section.

    To ensure that a script parses correctly in an XHTML document, use the following syntax:

    <script type="text/javascript"><![CDATA[
    document.write("Hello World!")
    //]]></script>>
  • Tuesday, May 19, 2009

    0

    Use of sub and sup tags.


    Definition and Usage.


    The <sub> tag defines subscript text. Subscript text appears half a character below the baseline. Subscript text can be used for chemical formulas, like H2O.

    The <sup> tag defines superscript text. Superscript text appears half a character above the baseline. Superscript text can be used for footnotes, like WWW[1].

    Example of sub.


    <html>
    <body>
    <p>This text contains
    <sub>subscript</sub> text.
    </p>
    </body>
    </html>

    Output.


    This text contains subscript text.


    Example of sup.


    <html>
    <body>
    <p>This text contains
    <sup>subscript</sup> text.
    </p>
    </body>
    </html>

    Output.


    This text contains superscript text.

    0

    use of legend tag.


    Definition and Usage.


    The <legend> tag defines a caption for the fieldset element.

    Differences Between HTML and XHTML.


    The align attribute was deprecated in HTML 4.01, and is not supported in XHTML 1.0 Strict DTD.

    DTD: indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.

    Example.


    <html>
    <body>
    <form>
    <fieldset>
    <legend>Personalia:</legend>
    Name: <input type="text" size="30" /><br />
    Email: <input type="text" size="30" /><br />
    Date of birth: <input type="text" size="10" />
    </fieldset>
    </form>
    </body>
    </html>
    0

    Use of Comment Tag.


    Definition and Usage.


    The comment tag is used to insert a comment in the source code. A comment will be ignored by the browser. You can use comments to explain your code, which can help you when you edit the source code at a later date.

    You can also store program-specific information inside comments. In this case they will not be visible for the user, but they are still available to the program. A good practice is to comment the text inside scripts and style elements to prevent older browsers, that do not support scripting or styles, from showing it as plain text.

    Example.


    <!--This is a comment. Comments are not displayed in the browser-->>

    <p>This is a paragraph.</p>
    0

    Use of acronym Tag.


    Definition and Usage.


    The <acronym> tag defines an acronym.

    An acronym can be spoken as if it were a word, example NATO, NASA, ASAP, GUI.

    By marking up acronyms you can give useful information to browsers, spellcheckers, screen readers, translation systems and search-engines.

    Example.


    <html>
    <body>
    Can I get this
    <acronym title="as soon as possible">
    ASAP
    </acronym>?
    </body>
    </html>

    Output.


    Can I get this ASAP?
    0

    Menu Tag and del tag.


    Definition and Usage of Menu.


    The <menu> tag is used to create a list of menu choices.

    Examples.


    <html>
    <body>
    <menu>
    <li>html</li>
    <li>xhtml</li>
    <li>css</li>
    </menu>
    </body>
    </html>


    <html>
    <body>
    <menu>
    <li><a href="http:\\www.htmlcodings.blogspot.com">html</li>
    <li><a href="http:\\www.htmlcodings.blogspot.com">xhtml</li>
    <li><a href="http:\\www.htmlcodings.blogspot.com">css</li>
    </menu>
    </body>
    <&/html>

    Definition and Usage of del.


    The <del> tag defines text that has been deleted from a document.

    Example.


    <html>
    <body>
    <p>
    My favorite color is
    <del>blue</del>
    <ins>red</ins>!
    </p>
    </body>
    </html>

    Output of del tag.


    My favorite color is blue red!

    Monday, May 18, 2009

    0

    Use of TBODY Tag.


    Definition and Usage.


    The <tbody> tag is used to group the body content in an HTML table.

    The tbody element should be used in conjunction with the thead and tfoot elements.

    The thead element is used to group the header content in an HTML table and the tfoot element is used to group the footer content in an HTML table.

    Notice that these elements will not affect the layout of the table by default. However, you can use CSS to let these elements affect the table's layout.

    Example.


    <html>
    <body>
    <table border="1">
    <thead>
    <tr>
    <th>Month</th>
    <th>Savings</th>
    </tr>
    </thead>
    <tbody>
    <tr>
    <td>January</td>
    <td>$100</td>
    </tr>
    <tr>
    <td>February</td>
    <td>$80</td>
    </tr>
    </tbody>
    <tfoot>
    <tr>
    <td>Sum</td>
    <td>$180</td>
    </tr>
    </tfoot>
    </table>
    </body>
    </html>
    0

    Use of Div Tag


    Definition and Usage.


    The <div> tag defines a division or a section in an HTML document.

    The <div> tag is often used to group block-elements to format them with styles.

    Example.


    <html>
    <body>
    <div style="color:#00FF00">
    <h3>This is a header<<h3>
    <p>This is a paragraph.</p>
    </div>
    </body>
    </html>
    0

    Mix Tag


    Definition and Usage.


    The <em>, <strong>, <dfn>, <code>, <samp>, <kbd>, <var>, and <cite> tags are all phrase tags. They are not deprecated, but it is possible to achieve richer effect with CSS.



    Example.


    <html>
    <body>
    <em>Emphasized text</em>
    <strong>Strong text</strong>
    <dfn>Definition term</dfn>
    <code>Computer code text</code>
    <samp>Sample computer code text</samp>
    <kbd>Keyboard text</kbd>
    <var>Variable</var>
    <cite>Citation</cite>
    </body>
    </html>

    Saturday, May 16, 2009

    0

    Use of Style Tag


    Definition and Usage.


    The <style> tag is used to define style information for an HTML document.

    In the style element you specify how HTML elements should render in a browser.

    The required type attribute defines the content of the style element. The only possible value is "text/css".

    The style element always goes inside the head section.

    Example.


    <html>
    <head>
    <style type="text/css">
    h1 {color:red}
    p {color:blue}
    </style>
    </head>

    <body>
    <h1>Header 1</h1>
    <p>A paragraph.</p>
    </body>
    </html>

    Tips and Notes.


    Tip: To link to an external style sheet, use the <link> tag.

    Tip: To learn more about style sheets, please read our CSS Tutorial.

    We learn more lessons about css.
    0

    Using of PRE TAG.


    Definition and Usage.


    The <pre> tag defines preformatted text.

    Text in a pre element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks.


    Example.


    <pre>
    Text in a pre element
    is displayed in a fixed-width
    font, and   it preserves
    both     spaces and
    line breaks
    </pre>

    Tips and Notes.


    Tip: Use the pre element to display computer code!
    0

    What is MAP Tag?


    Definition and Usage.


    The <map> tag is used to define a client-side image-map. An image-map is an image with clickable areas.

    The name attribute is required in the map element. This attribute is associated with the <img>'s usemap attribute and creates a relationship between the image and the map.

    The map element contains a number of area elements, that defines the clickable areas in the image map.

    Examples.


    <img src="planets.gif" width="145" height="126" alt="Planets" usemap="#planetmap" />

    <map name="planetmap">
    <area shape="rect" coords="0,0,82,126" href="sun.htm" alt="Sun" />
    <area shape="circle" coords="90,58,3" href="mercur.htm" alt="Mercury" />
    <area shape="circle" coords="124,58,8" href="venus.htm" alt="Venus" />
    </map>
    0

    Drop Down Menu


    Definition and Usage.


    The <select> tag is used to create a select list (drop-down list).

    The <option> tags inside the select element define the available options in the list.



    Examples.


    <select>
    <option value="volvo">Volvo</option>
    <option value="saab">Saab</option>
    <option value="mercedes">Mercedes</option>
    <option value="audi">Audi</option>
    </select>

    Tips And Notes.


    Tip: The select element is a form control and can be used in a form to collect user input.

    Friday, May 15, 2009

    0

    How can we insert button and text boxes?


    Definition and Usage


    Defines a push button. Inside a button element you can put content, like text or images. This is the difference between this element and buttons created with the input element.

    Differences Between HTML 4.01 and HTML 5.


    HTML 5 has a new attribute: autofocus.



    Examples.


    <html>
    <frame>
    Name:
    <input type=text name="tname"><br>
    Father Name:
    <input type=text name="Fname"><br>
    Messages:
    <textarea rows="2" cols="20" name="msg">
    Type Your Message.
    </textarea>
    <input type=submit value=Submit Form>
    <input type=reset value=Clear Form>
    </frame>
    </html>
    0

    How Can we insert you tube player?


    Tips And Notes


    Note: The <embed> element must have a src attribute.

    Tip: You can NOT write text between the start and end tags, to show older browser that they do not support this tag, like for <audio> and <video>.


    Media Player Examples.


    <embed src="horse.wav" />

    Youtube Player Examples.


    <html>>
    <center><h1>www.waqas.com.pk<br>
    <object width="425" height="350">
    <param name="movie" value="http://www.youtube.com/v/AyPzM5WK8ys" />
    <param name="wmode" value="transparent" />
    <embed src="http://www.youtube.com/v/AyPzM5WK8ys"
    type="application/x-shockwave-flash"
    wmode="transparent" width="425" height="350" />
    </object>
    </center>
    </html>

    Wednesday, May 13, 2009

    0

    Colors In Html



    Defination of Colors.


    The list below is a complete list of the color names supported by all major browsers.

    You can click on a color name (or a hex value) to view the color as the background-color along with different text colors.




    Colors Name.


    RED
    BLUE
    GREEN
    YELLOW
    DARKBLUE
    ORANGE
    GRAY
    WHITE
    BLACK
    0

    UNORDER LISTs


    An unordered list is a list of items. The list items are marked with bullets (typically small black circles).
    An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.




    Examples


    <ul>
    <li>Coffee</li>
    <li>Milk</li>
    </ul>

    Order Lists


    An ordered list is also a list of items. The list items are marked with numbers.
    An ordered list starts with the >ol< tag. Each list item starts with the >li< tag.

    Examples


    <ol>
    <li>Coffee</li>
    <li>Milk</li>
    </ol>

    Defination Lists


    A definition list is not a list of single items. It is a list of items (terms), with a description of each item (term).

    A definition list starts with a <dl> tag (definition list).

    Each term starts with a <dt> tag (definition term).

    Each description starts with a <dd> tag (definition description).
    <dl>
    <dt>Coffee</dt>
    <dd>Black hot drink</dd>
    <dt>Milk</dt>
    <dd>White cold drink</dd>
    </dl>

    Tuesday, May 12, 2009

    0

    Colspan And Row Span in Table


    Column Span extends cells on a horizontal row (left and right). The line to add for Column Span is COLSPAN="X". This line adds onto the cell so the final result would look like this. <TD COLSPAN=2 or 3 etc.>


    Examples Colspan


    <HTML>
    <BODY>
    <TABLE BORDER="1">
    <TR> <TD> Cell 1 </TD> <TD> Cell 2 </TD> </TR>
    <TR> <TD COLSPAN="2"> Cell 3 </TD> </TR>
    </TABLE>
    </BODY>

    Examples Rowspan


    <HTML>
    <BODY>
    <TABLE BORDER="1">
    <TR> <TD ROWSPAN="2"> Cell 1 </TD>
    <TD> Cell 2 </TD> </TR> <TR> <TD> Cell 3 </TD> </TR>
    </TABLE>
    </BODY>

    Saturday, May 9, 2009

    0

    WORK IN TABLES


    TABLES..
    Tables are defined with the <table> tag. A table is divided into rows (with the <tr> tag), and each row is divided into data cells (with the <td> tag). The letters td stands for "table data," which is the content of a data cell. A data cell can contain text, images, lists, paragraphs, forms, horizontal rules, tables, etc.

    examples..

    <html>
    <body>
    <Table border=1>
    <tr>
    <td>
    <Name>
    </td>
    <td>
    <class>
    </td>
    </tr>
    </table>
    </body>
    </html>

    Headings in Table...

    <html>
    <body>
    <Table border=2>
    <tr>
    <th>Name</th>
    </tr>
    <tr>
    <td>WAQAS SHAIKH</td>
    </tr>
    </table>
    </body>
    </html>
    0

    TABLES.


    Friday, May 8, 2009

    0

    HTML Basic Programs...


    HTML Headings

    HTML headings are defined with the <h1> to <h6> tags.

    Example

    <h1>This is a heading</h1>
    <h2>This is a heading</h2>
    <h3>This is a heading</h3>


    HTML Paragraphs

    HTML paragraphs are defined with the <p> tag.

    Example

    <p>This is a paragraph</p>
    <p>This is another paragraph</p>

    HTML Links

    HTML links are defined with the <a> tag.

    Example

    <a href="http://www.htmlcodings.blogspot.com">This is a link</a>

    Note: The link address is provided as an attribute.
    (You will learn about attributes in a later chapter of this tutorial)

    HTML Images

    HTML images are defined with the <img> tag.

    Example

    <img src="htmlcodings.jpg" width="104" height="142" />

    Note: The name and the size of the image are provided as attributes.
    (You will learn about attributes in a later chapter of this tutorial)

    Monday, May 4, 2009

    0

    What is HTML?


    What is HTML?
    HTML is a language for describing web pages.
    HTML stands for Hyper Text Markup Language.
    HTML is not a programming language, it is a markup language.
    A markup language is a set of markup tags.
    HTML uses markup tags to describe web pages.


    HTML Tags
    HTML markup tags are usually called HTML tags.
    HTML tags are keywords surrounded by angle brackets like HTML tags normally come in pairs like and The first tag in a pair is the start tag,the second tag is the end tag Start and end tags are also called opening tags and closing tags.

    HTML Documents = Web Pages
    HTML documents describe web pages
    HTML documents contain HTML tags and plain text
    HTML documents are also called web pages
    The purpose of a web browser (like Internet Explorer or Firefox) is to read HTML documents and display them as web pages. The browser does not display the HTML tags, but uses the tags to interpret the content of the page:

    <html>
    <body>
    <h1>My First Heading</h1>
    <p>My first paragraph</p>
    </body>
    </html>

    Example Explained
    The text between <html%gt; and </html> describes the web page.
    The text between <body> and </body> is the visible page content.
    The text between <h1> and </h1> is displayed as a heading.
    The text between <p> and </p> is displayed as a paragraph.