XML Attribute Values Must be Quoted

.

XML Attribute Values Must be Quoted

XML elements can have attributes in name/value pairs just like in HTML.

In XML, the attribute values must always be quoted.

Study the two XML documents below. The first one is incorrect, the second is correct:
<note date=12/11/2007>
  <to>Tove</to>
  <from>Jani</from>
</note>

<note date="12/11/2007">
  <to>Tove</to>
  <from>Jani</from>
</note>

The error in the first document is that the date attribute in the note element is not quoted.

Entity References

Some characters have a special meaning in XML.

If you place a character like "<" inside an XML element, it will generate an error because the parser interprets it as the start of a new element.

This will generate an XML error:
<message>if salary < 1000 then</message>

To avoid this error, replace the "<" character with an entity reference:
<message>if salary &lt; 1000 then</message>

There are 5 predefined entity references in XML:
&lt;     <     less than
&gt;     >     greater than
&amp;     &     ampersand
&apos;     '     apostrophe
&quot;     "     quotation mark

Note: Only the characters "<" and "&" are strictly illegal in XML. The greater than character is legal, but it is a good habit to replace it.

Comments in XML

The syntax for writing comments in XML is similar to that of HTML.

<!-- This is a comment -->

White-space is Preserved in XML

HTML truncates multiple white-space characters to one single white-space:
HTML:     Hello           Tove
Output:     Hello Tove

With XML, the white-space in a document is not truncated.

XML Stores New Line as LF

In Windows applications, a new line is normally stored as a pair of characters: carriage return (CR) and line feed (LF). In Unix applications, a new line is normally stored as an LF character. Macintosh applications also use an LF to store a new line.

XML stores a new line as LF.

Read More »»

XML Syntax Rules

.

XML Syntax Rules

All XML Elements Must Have a Closing Tag

In HTML, elements do not have to have a closing tag:

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

In XML, it is illegal to omit the closing tag. All elements must have a closing tag:
<p>This is a paragraph</p>
<p>This is another paragraph</p>

Note: You might have noticed from the previous example that the XML declaration did not have a closing tag. This is not an error. The declaration is not a part of the XML document itself, and it has no closing tag.

XML Tags are Case Sensitive

XML tags are case sensitive. The tag <Letter> is different from the tag <letter>.

Opening and closing tags must be written with the same case:
<Message>This is incorrect</message>
<message>This is correct</message>

Note: "Opening and closing tags" are often referred to as "Start and end tags". Use whatever you prefer. It is exactly the same thing.

XML Elements Must be Properly Nested

In HTML, you might see improperly nested elements:
<b><i>This text is bold and italic</b></i>

In XML, all elements must be properly nested within each other:
<b><i>This text is bold and italic</i></b>

In the example above, "Properly nested" simply means that since the <i> element is opened inside the <b> element, it must be closed inside the <b> element.

XML Documents Must Have a Root Element

XML documents must contain one element that is the parent of all other elements. This element is called the root element.
<root>
  <child>
    <subchild>.....</subchild>
  </child>
</root>

Read More »»

CreateDirectory In Visual baisc

.

CreateDirectory In Visual baisc
Imports System.IO
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If Not TextBox1.Text = String.Empty Then
            Dim dirinf As DirectoryInfo
            dirinf = New DirectoryInfo(TextBox1.Text)

            Try
                dirinf.Create()
            Catch ex As IOException
                MsgBox("tak dapat create directory" & vbCrLf & ex.Message)
            Catch ex1 As UnauthorizedAccessException
                MsgBox(" tak boleh create directory" & TextBox1.Text)
            End Try

            'cara kedua
            'Directory.CreateDirectory(TextBox1.Text)

        End If
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        If Not TextBox1.Text = String.Empty Then
            Dim dirinf As DirectoryInfo
            dirinf = New DirectoryInfo(TextBox1.Text)
            Try
                dirinf.Delete()
            Catch ex As IOException
                MsgBox("tek boleh delete")
            End Try
            'cara kedua
            'Directory.Delete(TextBox1.Text)

        End If
    End Sub
End Class

Read More »»

how to change button color in visual basic

.

change button color in visual basic

Public Class Form1

    Private Sub Button1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseMove
        Me.Button1.BackColor = Color.Blue
        Me.Button1.ForeColor = Color.Gold
    End Sub

    Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
        Me.Button1.BackColor = Color.Gray
        Me.Button1.ForeColor = Color.Black
    End Sub
End Class

Read More »»

PHP Variables

.

PHP Variables
Variables in PHP

Variables are used for storing values, like text strings, numbers or arrays.

When a variable is declared, it can be used over and over again in your script.

All variables in PHP start with a $ sign symbol.

The correct way of declaring a variable in PHP:
$var_name = value;

New PHP programmers often forget the $ sign at the beginning of the variable. In that case it will not work.

Let's try creating a variable containing a string, and a variable containing a number:
<?php
$txt="Hello World!";
$x=16;
?>

PHP is a Loosely Typed Language

In PHP, a variable does not need to be declared before adding a value to it.
In the example above, you see that you do not have to tell PHP which data type the variable is.
PHP automatically converts the variable to the correct data type, depending on its value.
In a strongly typed programming language, you have to declare (define) the type and name of the variable before using it.
In PHP, the variable is declared automatically when you use it.

Naming Rules for Variables

    * A variable name must start with a letter or an underscore "_"
    * A variable name can only contain alpha-numeric characters and underscores (a-z, A-Z, 0-9, and _ )
    * A variable name should not contain spaces. If a variable name is more than one word, it should be    separated with an underscore ($my_string), or with capitalization ($myString)

Read More »»

PHP String Variables

.

PHP String Variables

String Variables in PHP

String variables are used for values that contain characters.

In this chapter we are going to look at the most common functions and operators used to manipulate strings in PHP.

After we create a string we can manipulate it. A string can be used directly in a function or it can be stored in a variable.

Below, the PHP script assigns the text "Hello World" to a string variable called $txt:

<?php
$txt="Hello World";
echo $txt;
?>

The output of the code above will be:

Hello World

The Concatenation Operator


There is only one string operator in PHP.

The concatenation operator (.)  is used to put two string values together.

To concatenate two string variables together, use the concatenation operator:

<?php
$txt1="Hello World!";
$txt2="What a nice day!";
echo $txt1 . " " . $txt2;
?>

The output of the code above will be:

Hello World! What a nice day!

If we look at the code above you see that we used the concatenation operator two times. This is because we had to insert a third string (a space character), to separate the two strings.

The strlen() function

The strlen() function is used to return the length of a string.

Let's find the length of a string:
<?php
echo strlen("Hello world!");
?>

The output of the code above will be:

12

The length of a string is often used in loops or other functions, when it is important to know when the string ends. (i.e. in a loop, we would want to stop the loop after the last character in the string).

The strpos() function

The strpos() function is used to search for character within a string.

If a match is found, this function will return the position of the first match. If no match is found, it will return FALSE.

Let's see if we can find the string "world" in our string:
<?php
echo strpos("Hello world!","world");
?>

The output of the code above will be:

6

The position of the string "world" in our string is position 6. The reason that it is 6 (and not 7), is that the first position in the string is 0, and not 1.

Read More »»

JavaScript in (head)

.

JavaScript in (head)

The example below calls a function when a button is clicked:

<html>

<head>
<script type="text/javascript">
function displayDate()
{
document.getElementById("demo").innerHTML=Date();
}
</script>
</head>

<body>

<h1>My First Web Page</h1>

<p id="demo"></p>

<button type="button" onclick="displayDate()">Display Date</button>

</body>
</html>

Scripts in <head> and <body>

You can place an unlimited number of scripts in your document, and you can have scripts in both the body and the head section at the same time.

It is a common practice to put all functions in the head section, or at the bottom of the page. This way they are all in one place and do not interfere with page content.

Read More »»

A message box when page opens (Javascript Code)

.

A message box when page opens (Javascript Code)

You can bring a message box or a alert a window which tell something to user at the first when page opens

<!--
 this script got from http://codes-free.blogspot.com/ coded by:Codes
Eydat-->
<html>
<head>
<script language="javascript" type="text/javascript">
alert("Welcome to my site")
</script>
</head>
</html>      
<font face="Tahoma"><a target="_blank"
href="http://codes-free.blogspot.com//"><span style="font-size:
8pt; text-decoration: none">JavaScript Free
Code</span></a></font>

Read More »»

CSS Syntax

.

CSS Syntax

CSS Example

CSS declarations always ends with a semicolon, and declaration groups are surrounded by curly brackets:

p {color:red;text-align:center;}

To make the CSS more readable, you can put one declaration on each line, like this:

p
{
color:red;
text-align:center;
}


CSS Comments

Comments are used to explain your code, and may help you when you edit the source code at a later date. Comments are ignored by browsers.

A CSS comment begins with "/*", and ends with "*/", like this:
/*This is a comment*/
p
{
text-align:center;
/*This is another comment*/
color:black;
font-family:arial;
}

Read More »»

CSS Introduction

.

CSS Introduction

What is CSS?

    * CSS stands for Cascading Style Sheets
    * Styles define how to display HTML elements
    * Styles were added to HTML 4.0 to solve a problem
    * External Style Sheets can save a lot of work
    * External Style Sheets are stored in CSS files

Styles Solved a Big Problem
HTML was never intended to contain tags for formatting a document.
HTML was intended to define the content of a document, like:
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
When tags like <font>, and color attributes were added to the HTML 3.2 specification, it started a nightmare for web developers. Development of large web sites, where fonts and color information were added to every single page, became a long and expensive process.

To solve this problem, the World Wide Web Consortium (W3C) created CSS.

In HTML 4.0, all formatting could be removed from the HTML document, and stored in a separate CSS file.
All browsers support CSS today.

CSS Saves a Lot of Work!

CSS defines HOW HTML elements are to be displayed.

Styles are normally saved in external .css files. External style sheets enable you to change the appearance and layout of all the pages in a Web site, just by editing one single file!

Read More »»

ASP Forms and User Input

.

ASP Forms and User Input

 User Input
The Request.QueryString and Request.Form commands are used to retrieve user input from forms.

<form method="get" action="simpleform.asp">
First Name: <input type="text" name="fname" /><br />
Last Name: <input type="text" name="lname" /><br /><br />
<input type="submit" value="Submit" />
</form>

Request.QueryString

The Request.QueryString command is used to collect values in a form with method="get".
Information sent from a form with the GET method is visible to everyone (it will be displayed in the browser's address bar) and has limits on the amount of information to send.
If a user typed "Bill" and "Gates" in the HTML form above, the URL sent to the server would look like this:

http://www.Google.com/simpleform.asp?fname=Bill&lname=Gates

Assume that "simpleform.asp" contains the following ASP script:

<body>
Welcome
<%
response.write(request.querystring("fname"))
response.write(" " & request.querystring("lname"))
%>
</body>

The browser will display the following in the body of the document:

Welcome Bill Gates

Request.Form

The Request.Form command is used to collect values in a form with method="post".
Information sent from a form with the POST method is invisible to others and has no limits on the amount of information to send.
If a user typed "Bill" and "Gates" in the HTML form above, the URL sent to the server would look like this:

http://www.Google.com/simpleform.asp

Assume that "simpleform.asp" contains the following ASP script:

<body>
Welcome
<%
response.write(request.form("fname"))
response.write(" " & request.form("lname"))
%>
</body>

The browser will display the following in the body of the document:

Welcome Bill Gates

Form Validation

User input should be validated on the browser whenever possible (by client scripts). Browser validation is faster and reduces the server load.

You should consider server validation if the user input will be inserted into a database. A good way to validate a form on the server is to post the form to itself, instead of jumping to a different page. The user will then get the error messages on the same page as the form. This makes it easier to discover the error.

Read More »»

ASP Procedures

.

ASP Procedures

<html>
<head>
<%
sub vbproc(num1,num2)
response.write(num1*num2)
end sub
%>
</head>
<body>

<p>Result: <%call vbproc(3,4)%></p>


</body>

</html>

Insert the <%@ language="language" %> line above the <html> tag to write the procedure/function in another scripting language: 

<%@ language="javascript" %>
<html>
<head>
<%
function jsproc(num1,num2)
{
Response.Write(num1*num2)
}
%>
</head>
<body>

<p>Result: <%jsproc(3,4)%></p>

</body>
</html>
 

 

Read More »»

How To JavaScript

.

Writing to The HTML Document 

The example below writes a <p> element with current date information to the HTML document:

 <html>
<body>

<h1>My First Web Page</h1>

<script type="text/javascript">
document.write("<p>" + Date() + "</p>");
</script>


</body>
</html> 

Changing HTML Elements

The example below writes the current date into an existing <p> element:

<html>
<body>

<h1>My First Web Page</h1>

<p id="demo"></p>

<script type="text/javascript">
document.getElementById("demo").innerHTML=Date();
</script>


</body>
</html> 

Read More »»

JavaScript Introduction

.

What is JavaScript?

  • JavaScript was designed to add interactivity to HTML pages
  • JavaScript is a scripting language
  • A scripting language is a lightweight programming language
  • JavaScript is usually embedded directly into HTML pages
  • JavaScript is an interpreted language (means that scripts execute without preliminary compilation)
  • Everyone can use JavaScript without purchasing a license

Are Java and JavaScript the same?

NO!
Java and JavaScript are two completely different languages in both concept and design!
Java (developed by Sun Microsystems) is a powerful and much more complex programming language - in the same category as C and C++.

 What can a JavaScript do?
  • JavaScript gives HTML designers a programming tool - HTML authors are normally not programmers, but JavaScript is a scripting language with a very simple syntax! Almost anyone can put small "snippets" of code into their HTML pages
  • JavaScript can put dynamic text into an HTML page - A JavaScript statement like this: document.write("<h1>" + name + "</h1>") can write a variable text into an HTML page
  • JavaScript can react to events - A JavaScript can be set to execute when something happens, like when a page has finished loading or when a user clicks on an HTML element
  • JavaScript can read and write HTML elements - A JavaScript can read and change the content of an HTML element
  • JavaScript can be used to validate data - A JavaScript can be used to validate form data before it is submitted to a server. This saves the server from extra processing
  • JavaScript can be used to detect the visitor's browser - A JavaScript can be used to detect the visitor's browser, and - depending on the browser - load another page specifically designed for that browser
  • JavaScript can be used to create cookies - A JavaScript can be used to store and retrieve information on the visitor's computer
   
JavaScript = ECMAScript

JavaScript is an implementation of the ECMAScript language standard. ECMA-262 is the official JavaScript standard.
JavaScript was invented by Brendan Eich at Netscape (with Navigator 2.0), and has appeared in all browsers since 1996.
The official standardization was adopted by the ECMA organization (an industry standardization association) in 1997.
The ECMA standard (called ECMAScript-262) was approved as an international ISO (ISO/IEC 16262) standard in 1998.
The development is still in progress.

Read More »»

PHP Syntax

.

Basic PHP Syntax

A PHP scripting block always starts with <?php and ends with ?>. A PHP scripting block can be placed anywhere in the document.
On servers with shorthand support enabled you can start a scripting block with <? and end with ?>.
For maximum compatibility, we recommend that you use the standard form (<?php) rather than the shorthand form.

<?php
?> 

A PHP file normally contains HTML tags, just like an HTML file, and some PHP scripting code.
Below, we have an example of a simple PHP script which sends the text "Hello World" to the browser:

<html>
<body>

<?php
echo "Hello World";
?>

</body>
</html> 

Each code line in PHP must end with a semicolon. The semicolon is a separator and is used to distinguish one set of instructions from another.
There are two basic statements to output text with PHP: echo and print. In the example above we have used the echo statement to output the text "Hello World".
Note: The file must have a .php extension. If the file has a .html extension, the PHP code will not be executed.

Comments in PHP

In PHP, we use // to make a single-line comment or /* and */ to make a large comment block.

<html>
<body>

<?php
//This is a comment

/*
This is
a comment
block
*/
?>

</body>
</html> 

Read More »»

PHP Introduction

.

PHP is a server-side scripting language

What is PHP?

  • PHP stands for PHP: Hypertext Preprocessor
  • PHP is a server-side scripting language, like ASP
  • PHP scripts are executed on the server
  • PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.)
  • PHP is an open source software
  • PHP is free to download and use

What is a PHP File?

  • PHP files can contain text, HTML tags and scripts
  • PHP files are returned to the browser as plain HTML 
  • PHP files have a file extension of ".php", ".php3", or ".phtml"

What is MySQL?

  • MySQL is a database server
  • MySQL is ideal for both small and large applications
  • MySQL supports standard SQL
  • MySQL compiles on a number of platforms
  • MySQL is free to download and use

PHP + MySQL

  • PHP combined with MySQL are cross-platform (you can develop in Windows and serve on a Unix platform)

Why PHP?

  • PHP runs on different platforms (Windows, Linux, Unix, etc.)
  • PHP is compatible with almost all servers used today (Apache, IIS, etc.)
  • PHP is FREE to download from the official PHP resource: www.php.net
  • PHP is easy to learn and runs efficiently on the server side

Where to Start?

To get access to a web server with PHP support, you can:
  • Install Apache (or IIS) on your own server, install PHP, and MySQL
  • Or find a web hosting plan with PHP and MySQL support

    Read More »»

    An Example XML Document

    .

    XML documents use a self-describing and simple syntax:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <note>
      <to>Tove</to>
      <from>Jani</from>
      <heading>Reminder</heading>
      <body>Don't forget me this weekend!</body>
    </note>

    The first line is the XML declaration. It defines the XML version (1.0) and the encoding used (ISO-8859-1 = Latin-1/West European character set).

    The next 4 lines describe 4 child elements of the root (to, from, heading, and body):

    <to>Tove</to>
    <from>Jani</from>
    <heading>Reminder</heading>
    <body>Don't forget me this weekend!</body>


    The image above represents one book in the XML below:

    <bookstore>
      <book category="COOKING">
        <title lang="en">Everyday Italian</title>
        <author>Giada De Laurentiis</author>
        <year>2005</year>
        <price>30.00</price>
      </book>
      <book category="CHILDREN">
        <title lang="en">Harry Potter</title>
        <author>J K. Rowling</author>
        <year>2005</year>
        <price>29.99</price>
      </book>
      <book category="WEB">
        <title lang="en">Learning XML</title>
        <author>Erik T. Ray</author>
        <year>2003</year>
        <price>39.95</price>
      </book>
    </bookstore>


    The root element in the example is <bookstore>. All <book> elements in the document are contained within <bookstore>.
    The <book> element has 4 children: <title>,< author>, <year>, <price>.

    Read More »»

    How Can XML be Used?

    .

    XML Separates Data from HTML

    If you need to display dynamic data in your HTML document, it will take a lot of work to edit the HTML each time the data changes.
    With XML, data can be stored in separate XML files. This way you can concentrate on using HTML for layout and display, and be sure that changes in the underlying data will not require any changes to the HTML.
    With a few lines of JavaScript code, you can read an external XML file and update the data content of your web page.

    XML Simplifies Data Sharing

    In the real world, computer systems and databases contain data in incompatible formats.
    XML data is stored in plain text format. This provides a software- and hardware-independent way of storing data.
    This makes it much easier to create data that can be shared by different applications.

    XML Simplifies Data Transport

    One of the most time-consuming challenges for developers is to exchange data between incompatible systems over the Internet.
    Exchanging data as XML greatly reduces this complexity, since the data can be read by different incompatible applications.

    XML Simplifies Platform Changes

    Upgrading to new systems (hardware or software platforms), is always time consuming. Large amounts of data must be converted and incompatible data is often lost.
    XML data is stored in text format. This makes it easier to expand or upgrade to new operating systems, new applications, or new browsers, without losing data.

    XML Makes Your Data More Available

    Different applications can access your data, not only in HTML pages, but also from XML data sources.
    With XML, your data can be available to all kinds of "reading machines" (Handheld computers, voice machines, news feeds, etc), and make it more available for blind people, or people with other disabilities.

    XML is Used to Create New Internet Languages

    A lot of new Internet languages are created with XML.
    Here are some examples:
    • XHTML 
    • WSDL for describing available web services
    • WAP and WML as markup languages for handheld devices
    • RSS languages for news feeds
    • RDF and OWL for describing resources and ontology
    • SMIL for describing multimedia for the web 

    Read More »»

    Introduction to XML

    .

    What is XML?

    • XML stands for EXtensible Markup Language
    • XML is a markup language much like HTML
    • XML was designed to carry data, not to display data
    • XML tags are not predefined. You must define your own tags
    • XML is designed to be self-descriptive
    • XML is a W3C Recommendation

    The Difference Between XML and HTML

    XML is not a replacement for HTML.
    XML and HTML were designed with different goals:
    • XML was designed to transport and store data, with focus on what data is
    • HTML was designed to display data, with focus on how data looks
    HTML is about displaying information, while XML is about carrying information.

    The Difference Between XML and HTML

    XML is not a replacement for HTML.
    XML and HTML were designed with different goals:
    • XML was designed to transport and store data, with focus on what data is
    • HTML was designed to display data, with focus on how data looks
    HTML is about displaying information, while XML is about carrying information.

     XML Does Not DO Anything

    Maybe it is a little hard to understand, but XML does not DO anything. XML was created to structure, store, and transport information.
    The following example is a note to Tove, from Jani, stored as XML:

    <note>
    <to>Tove</to>
    <from>Jani</from>
    <heading>Reminder</heading>
    <body>Don't forget me this weekend!</body>
    </note>

    The note above is quite self descriptive. It has sender and receiver information, it also has a heading and a message body.
    But still, this XML document does not DO anything. It is just information wrapped in tags. Someone must write a piece of software to send, receive or display it.

    With XML You Invent Your Own Tags

    The tags in the example above (like <to> and <from>) are not defined in any XML standard. These tags are "invented" by the author of the XML document.
    That is because the XML language has no predefined tags.
    The tags used in HTML are predefined. HTML documents can only use tags defined in the HTML standard (like <p>, <h1>, etc.).
    XML allows the author to define his/her own tags and his/her own document structure.

    Read More »»

    ASP Basic Hello world

    .

    Write Output to a Browser

    An ASP file normally contains HTML tags, just like an HTML file. However, an ASP file can also contain server scripts, surrounded by the delimiters <% and %>.
    Server scripts are executed on the server, and can contain any expressions, statements, procedures, or operators valid for the scripting language you prefer to use.

    The response.write Command

    The response.write command is used to write output to a browser. The following example sends the text "Hello World" to the browser:

    <html>
    <body>
    <%
    response.write("Hello World!")
    %>

    </body>
    </html> 

    There is also a shorthand method for the response.write command. The following example also sends the text "Hello World" to the browser:

    <html>
    <body>
    <%
    ="Hello World!"
    %>

    </body>
    </html> 

    Using VBScript in ASP

    You can use several scripting languages in ASP. However, the default scripting language is VBScript:

    <html>
    <body>
    <%
    response.write("Hello World!")
    %>
    </body>
    </html>

    Using JavaScript in ASP

    To set JavaScript as the default scripting language for a particular page you must insert a language specification at the top of the page:

    <%@ language="javascript"%>
    <html>
    <body>
    <%
    Response.Write("Hello World!")
    %>
    </body>
    </html>
     
    Note: JavaScript is case sensitive! You will have to write your ASP code with uppercase letters and lowercase letters when the language requires it.

    Read More »»

    ASP Introduction...

    .

    An ASP file can contain text, HTML tags and scripts. Scripts in an ASP file are executed on the server.
      

    What you should already know
    Before you continue you should have some basic understanding of the following:
    • HTML / XHTML
    • A scripting language like JavaScript or VBScript

    What is ASP?

    • ASP stands for Active Server Pages
    • ASP is a Microsoft Technology
    • ASP is a program that runs inside IIS
    • IIS stands for Internet Information Services
    • IIS comes as a free component with Windows 2000
    • IIS is also a part of the Windows NT 4.0 Option Pack
    • The Option Pack can be downloaded from Microsoft
    • PWS is a smaller - but fully functional - version of IIS
    • PWS can be found on your Windows 95/98 CD

    ASP Compatibility

    • To run IIS you must have Windows NT 4.0 or later
    • To run PWS you must have Windows 95 or later
    • ChiliASP is a technology that runs ASP without Windows OS
    • InstantASP is another technology that runs ASP without Windows

    What is an ASP File?

    • An ASP file is just the same as an HTML file
    • An ASP file can contain text, HTML, XML, and scripts
    • Scripts in an ASP file are executed on the server
    • An ASP file has the file extension ".asp"

    How Does ASP Differ from HTML?

    • When a browser requests an HTML file, the server returns the file
    • When a browser requests an ASP file, IIS passes the request to the ASP engine. The ASP engine reads the ASP file, line by line, and executes the scripts in the file. Finally, the ASP file is returned to the browser as plain HTML

    What can ASP do for you?

    • Dynamically edit, change, or add any content of a Web page
    • Respond to user queries or data submitted from HTML forms
    • Access any data or databases and return the results to a browser
    • Customize a Web page to make it more useful for individual users
    • The advantages of using ASP instead of CGI and Perl, are those of simplicity and speed
    • Provide security - since ASP code cannot be viewed from the browser
    • Clever ASP programming can minimize the network traffic
    Note: Because ASP scripts are executed on the server, the browser that displays the ASP file does not need to support scripting at all!

    Read More »»

    Examples in Each Chapter

    .

    This HTML tutorial contains hundreds of HTML examples.

    <html>
    <body>

    <h1>My First Heading</h1>

    <p>My first paragraph.</p>

    </body>
    </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>
    • HTML tags normally come in pairs like <b> and </b>
    • 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> 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

    HTML Headings

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

    <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.

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

    HTML Links 

    HTML links are defined with the <a> tag.

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

    HTML Images

    HTML images are defined with the <img> tag.

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

    Read More »»

    HTML Tags Chart

    .

    To use any of the following HTML tags, simply select the HTML code you'd like and copy and paste it into your web page.
    Tag
    Name
    Code Example
    Browser View
    <!-- comment <!--This can be viewed in the HTML part of a document--> Nothing will show (Tip)
    <a - anchor <a href="http://www.domain.com/">
    Visit Our Site</a>
    Visit Our Site (Tip)
    <b> bold <b>Example</b> Example
    <big> big (text) <big>Example</big> Example (Tip)
    <body> body of HTML document <body>The content of your HTML page</body> Contents of your web page (Tip)
    <br> line break The contents of your page<br>The contents of your page The contents of your web page
    The contents of your web page
    <center> center <center>This will center your contents</center>
    This will center your contents
    <dd> definition description <dl>
    <dt>Definition Term</dt>
    <dd>Definition of the term</dd>
    <dt>Definition Term</dt>
    <dd>Definition of the term</dd>
    </dl>

    Definition Term
    Definition of the term
    Definition Term
    Definition of the term
    <dl> definition list <dl>
    <dt>Definition Term</dt>
    <dd>Definition of the term</dd>
    <dt>Definition Term</dt>
    <dd>Definition of the term</dd>
    </dl>

    Definition Term
    Definition of the term
    Definition Term
    Definition of the term
    <dt> definition term <dl>
    <dt>Definition Term</dt>
    <dd>Definition of the term</dd>
    <dt>Definition Term</dt>
    <dd>Definition of the term</dd>
    </dl>

    Definition Term
    Definition of the term
    Definition Term
    Definition of the term
    <em> emphasis This is an <em>Example</em> of using the emphasis tag This is an Example of using the emphasis tag
    <embed>
    embed object <embed src="yourfile.mid" width="100%" height="60" align="center">
    (Tip)
    <embed> embed object <embed src="yourfile.mid" autostart="true" hidden="false" loop="false">
    <noembed><bgsound src="yourfile.mid" loop="1"></noembed>

    &amp;lt;bgsound src="wonderfu.mid" autostart="false" loop="1" /&amp;gt;
    Music will begin playing when your page is loaded and will only play one time. A control panel will be displayed to enable your visitors to stop the music.
    <font> font <font face="Times New Roman">Example</font> Example (Tip)
    <font> font <font face="Times New Roman" size="4">Example</font> Example (Tip)
    <font> font <font face="Times New Roman" size="+3" color="#ff0000">Example</font> Example (Tip)
    <form> form <form action="mailto:you@yourdomain.com">
    Name: <input name="Name" value="" size="10"><br>
    Email: <input name="Email" value="" size="10"><br>
    <center><input type="submit"></center>
    </form>
    Name: (Tip)
    Email:
    <h1>
    <h2>
    <h3>
    <h4>
    <h5>
    <h6>
    heading 1
    heading 2
    heading 3
    heading 4
    heading 5
    heading 6
    <h1>Heading 1 Example</h1>
    <h2>Heading 2 Example</h2>
    <h3>Heading 3 Example</h3>
    <h4>Heading 4 Example</h4>
    <h5>Heading 5 Example</h5>
    <h6>Heading 6 Example</h6>

    <head> heading of HTML document <head>Contains elements describing the document</head> Nothing will show
    <hr> horizontal rule <hr />
    Contents of your web page (Tip)

    Contents of your web page
    <hr> horizontal rule <hr width="50%" size="3" /> Contents of your web page

    Contents of your web page
    <hr> horizontal rule <hr width="50%" size="3" noshade /> Contents of your web page

    Contents of your web page
    <hr>
    (Internet
    Explorer)
    horizontal rule <hr width="75%" color="#ff0000" size="4" /> Contents of your web page

    Contents of your web page
    <hr>
    (Internet
    Explorer)
    horizontal rule <hr width="25%" color="#6699ff" size="6" /> Contents of your web page

    Contents of your web page
    <html> hypertext markup language <html>
    <head>
    <meta>
    <title>Title of your web page</title>
    </head>
    <body>HTML web page contents
    </body>
    </html>
    Contents of your web page
    <i> italic <i>Example</i> Example
    <img> image <img src="Earth.gif" width="41" height="41" border="0" alt="text describing the image" /> a sentence about your site (Tip)
    <input> input field Example 1:

    <form method=post action="/cgi-bin/example.cgi">
    <input type="text" size="10" maxlength="30">
    <input type="Submit" value="Submit">
    </form>
    Example 1: (Tip)

    <input>
    (Internet Explorer)
    input field Example 2:

    <form method=post action="/cgi-bin/example.cgi">
    <input type="text" style="color: #ffffff; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72a4d2;" size="10" maxlength="30">
    <input type="Submit" value="Submit">
    </form>
    Example 2: (Tip)

    <input> input field Example 3:

    <form method=post action="/cgi-bin/example.cgi">
    <table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#8463ff"><input type="text" size="10" maxlength="30"></td><td bgcolor="#8463ff" valign="Middle"> <input type="image" name="submit" src="yourimage.gif"></td></tr> </table>
    </form>
    Example 3: (Tip)
    <input> input field Example 4:

    <form method=post action="/cgi-bin/example.cgi">
    Enter Your Comments:<br>
    <textarea wrap="virtual" name="Comments" rows=3 cols=20 maxlength=100></textarea><br>
    <input type="Submit" value="Submit">
    <input type="Reset" value="Clear">
    </form>
    Example 4: (Tip)


    <input> input field Example 5:

    <form method=post action="/cgi-bin/example.cgi">
    <center>
    Select an option:
    <select>
    <option >option 1</option>
    <option selected>option 2</option>
    <option>option 3</option>
    <option>option 4</option>
    <option>option 5</option>
    <option>option 6</option>
    </select><br>
    <input type="Submit" value="Submit"></center>
    </form>
    Example 5: Tip)

    Select an option:

    <input> input field Example 6:

    <form method=post action="/cgi-bin/example.cgi">
    Select an option:<br>
    <input type="radio" name="option"> Option 1
    <input type="radio" name="option" checked> Option 2
    <input type="radio" name="option"> Option 3
    <br>
    <br>
    Select an option:<br>
    <input type="checkbox" name="selection"> Selection 1
    <input type="checkbox" name="selection" checked> Selection 2
    <input type="checkbox" name="selection"> Selection 3
    <input type="Submit" value="Submit">
    </form>
    Example 6: (Tip)

    Select an option:

    Option 1
    Option 2
    Option 3

    Select an option:

    Selection 1
    Selection 2
    Selection 3
    <li> list item Example 1:

    <menu>
    <li type="disc">List item 1</li>
    <li type="circle">List item 2</li>
    <li type="square">List item 3</li>
    </MENU>

    Example 2:

    <ol type="i">
    <li>List item 1</li>
    <li>List item 2</li>
    <li>List item 3</li>
    <li>List item 4</li>
    </ol>
    Example 1: (Tip)
    • List item 1
    • List item 2
    • List item 3

    Example 2:
    1. List item 1
    2. List item 2
    3. List item 3
    4. List item 4
    <link> link <head>
    <link rel="stylesheet" type="text/css" href="style.css" />
    </head>

    <marquee>
    (Internet
    Explorer)
    scrolling text <marquee bgcolor="#cccccc" loop="-1" scrollamount="2" width="100%">Example Marquee</marquee> Example Marquee (Tip)
    <menu> menu <menu>
    <li type="disc">List item 1</li>
    <li type="circle">List item 2</li>
    <li type="square">List item 3</li>
    </menu>
    • List item 1
    • List item 2
    • List item 3
    <meta> meta <meta name="Description" content="Description of your site">
    <meta name="keywords" content="keywords describing your site">
    Nothing will show (Tip)
    <meta> meta <meta HTTP-EQUIV="Refresh" CONTENT="4;URL=http://www.yourdomain.com/"> Nothing will show (Tip)
    <meta> meta <meta http-equiv="Pragma" content="no-cache"> Nothing will show (Tip)
    <meta> meta <meta name="rating" content="General"> Nothing will show (Tip)
    <meta> meta <meta name="robots" content="all"> Nothing will show (Tip)
    <meta> meta <meta name="robots" content="noindex,follow"> Nothing will show (Tip)
    <ol> ordered list Numbered

    <ol>
    <li>List item 1</li>
    <li>List item 2</li>
    <li>List item 3</li>
    <li>List item 4</li>
    </ol>

    Numbered Special Start

    <ol start="5">
    <li>List item 1</li>
    <li>List item 2</li>
    <li>List item 3</li>
    <li>List item 4</li>
    </ol>

    Lowercase Letters
    <ol type="a">
    <li>List item 1</li>
    <li>List item 2</li>
    <li>List item 3</li>
    <li>List item 4</li>
    </ol>

    Capital Letters
    <ol type="A">
    <li>List item 1</li>
    <li>List item 2</li>
    <li>List item 3</li>
    <li>List item 4</li>
    </ol>

    Capital Letters Special Start
    <ol type="A" start="3">
    <li>List item 1</li>
    <li>List item 2</li>
    <li>List item 3</li>
    <li>List item 4</li>
    </ol>

    Lowercase Roman Numerals
    <ol type="i">
    <li>List item 1</li>
    <li>List item 2</li>
    <li>List item 3</li>
    <li>List item 4</li>
    </ol>

    Capital Roman Numerals
    <ol type="I">
    <li>List item 1</li>
    <li>List item 2</li>
    <li>List item 3</li>
    <li>List item 4</li>
    </ol>


    Capital Roman Numerals Special Start
    <ol type="I" start="7">
    <li>List item 1</li>
    <li>List item 2</li>
    <li>List item 3</li>
    <li>List item 4</li>
    </ol>
    Numbered
    1. List item 1
    2. List item 2
    3. List item 3
    4. List item 4
    Numbered Special Start
    1. List item 1
    2. List item 2
    3. List item 3
    4. List item 4
    Lowercase Letters
    1. List item 1
    2. List item 2
    3. List item 3
    4. List item 4
    Capital Letters
    1. List item 1
    2. List item 2
    3. List item 3
    4. List item 4
    Capital Letters Special Start
    1. List item 1
    2. List item 2
    3. List item 3
    4. List item 4
    Lowercase Roman Numerals
    1. List item 1
    2. List item 2
    3. List item 3
    4. List item 4
    Capital Roman Numerals
    1. List item 1
    2. List item 2
    3. List item 3
    4. List item 4
    Capital Roman Numerals Special Start
    1. List item 1
    2. List item 2
    3. List item 3
    4. List item 4
    <option> listbox option <form method=post action="/cgi-bin/example.cgi">
    <center>
    Select an option:
    <select>
    <option>option 1</option>
    <option selected>option 2</option>
    <option>option 3</option>
    <option>option 4</option>
    <option>option 5</option>
    <option>option 6</option>
    </select><br>
    </center>
    </form>
    Select an option: (Tip)

    <p> paragraph This is an example displaying the use of the paragraph tag. <p> This will create a line break and a space between lines.

    Attributes:

    Example 1:<br>
    <br>
    <p align="left">
    This is an example<br>
    displaying the use<br>
    of the paragraph tag.<br>
    <br>
    Example 2:<br>
    <br>
    <p align="right">
    This is an example<br>
    displaying the use<br>
    of the paragraph tag.<br>
    <br>
    Example 3:<br>
    <br>
    <p align="center">
    This is an example<br>
    displaying the use<br>
    of the paragraph tag.
    This is an example displaying the use of the paragraph tag.
    This will create a line break and a space between lines.

    Attributes:


    Example 1:


    This is an example

    displaying the use
    of the paragraph tag.
    Example 2:

    This is an example

    displaying the use
    of the paragraph tag.
    Example 3:

    This is an example

    displaying the use
    of the paragraph tag.
    <small> small (text) <small>Example</small> Example (Tip)
    <strike> deleted text <strike>Example</strike> Example
    <strong> strong emphasis <strong>Example</strong> Example
    <table> table Example 1:

    <table border="4" cellpadding="2" cellspacing="2" width="100%">
    <tr>
    <td>Column 1</td>
    <td>Column 2</td>
    </tr>
    </table>

    Example 2: (Internet Explorer)

    <table border="2" bordercolor="#336699" cellpadding="2" cellspacing="2" width="100%">
    <tr>
    <td>Column 1</td>
    <td>Column 2</td>
    </tr>
    </table>

    Example 3:

    <table cellpadding="2" cellspacing="2" width="100%">
    <tr>
    <td bgcolor="#cccccc">Column 1</td>
    <td bgcolor="#cccccc">Column 2</td>
    </tr>
    <tr>
    <td>Row 2</td>
    <td>Row 2</td>
    </tr>
    </table>
    Example 1: (Tip)
    Column 1 Column 2

    Example 2: (Tip)
    Column 1 Column 2

    Example 3: (Tip)
    Column 1 Column 2
    Row 2 Row 2
    <td> table data <table border="2" cellpadding="2" cellspacing="2" width="100%">
    <tr>
    <td>Column 1</td>
    <td>Column 2</td>

    </tr>
    </table>

    Column 1 Column 2
    <th> table header <div align="center">
    <table>
    <tr>
    <th>Column 1</th>
    <th>Column 2</th>
    <th>Column 3</th>

    </tr>
    <tr>
    <td>Row 2</td>
    <td>Row 2</td>
    <td>Row 2</td>
    </tr>
    <tr>
    <td>Row 3</td>
    <td>Row 3</td>
    <td>Row 3</td>
    </tr>
    <tr>
    <td>Row 4</td>
    <td>Row 4</td>
    <td>Row 4</td>
    </tr>
    </table>
    </div>
    Column 1 Column 2 Column 3
    Row 2 Row 2 Row 2
    Row 3 Row 3 Row 3
    Row 4 Row 4 Row 4
    <title> document title <title>Title of your HTML page</title> Title of your web page will be viewable in the title bar. (Tip)
    <tr> table row <table border="2" cellpadding="2" cellspacing="2" width="100%">
    <tr>
    <td>Column 1</td>
    <td>Column 2</td>
    </tr>
    </table>
    Column 1 Column 2
    <tt> teletype <tt>Example</tt> Example
    <u> underline <u>Example</u> Example
    <ul> unordered list Example 1:<br>
    <br>
    <ul>
    <li>List item 1</li>
    <li>List item 2</li>
    </ul>
    <br>
    Example 2:<br>
    <ul type="disc">
    <li>List item 1</li>
    <li>List item 2</li>
    <ul type="circle">
    <li>List item 3</li>
    <li>List item 4</li>
    </ul>
    </ul>
    Example 1:

    • List item 1
    • List item 2

    Example 2:
    • List item 1
    • List item 2
      • List item 3
      • List item 4

    Read More »»
     
    Related Posts Plugin for WordPress, Blogger...