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

    Hello World in Visual Basic

    .

    Listing 1. Hello World in Visual Basic (HelloVB.vb)

    ' Allow easy reference to the System namespace classes.
    Imports System
    
    ' This module houses the application's entry point.
    Public Module modmain
       ' Main is the application's entry point.
       Sub Main()
         ' Write text to the console.
         Console.WriteLine ("Hello World using Visual Basic!")
       End Sub
    End Module
     
     

    Read More »»

    "Hello, World" Visual Basic

    .

    The following console program is the Visual Basic version of the traditional "Hello, World!" program, which displays the string "Hello, World!".

    ' A "Hello, World!" program in Visual Basic.
    Module Hello
      Sub Main()
          MsgBox("Hello, World!") ' Display message on computer screen.
      End Sub
    End Module
    The important points of this program are the following:
    • Comments
    • The Main procedure
    • Input and output
    • Compilation and execution


     The main Procedure

    Every Visual Basic application must contain a procedure called Main. This procedure serves as the starting point and overall control for your application. It is called when your module is loaded.
    There are four varieties of Main:
    • Sub Main()
    • Sub Main(ByVal cmdArgs() As String)
    • Function Main() As Integer
    • Function Main(ByVal cmdArgs() As String) As Integer
    The most common variety of this procedure is Sub Main(). Unless you are creating a Windows Forms application, you must write the Main procedure for applications that run on their own.

    To compile and run the program from the IDE

    1. Create a Visual Basic console application project.
    2. Copy the code into the project.
    3. Choose the appropriate Build command from the Build menu, or press F5 to build and run (corresponding to Start in the Debug menu).

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