1. Page
2. Form
3. Cookies
   - Cookies in JavaScript
   - Cookies in ASP
   - Cookies in PHP
   - Cookies in C#
4. Tooltip

HTML is language used do display pages in Internet browsers.

HTML specification
HTML 4 definition (DTD)
HTML Examples on W3 Schools

1. Page

The code below show simple html page with list, link, image, and table
Code example:Simple html page

<!--- this is a comment -->

   <title>Simple page</title>
    Paragraph 1
    Paragraph 2
    <!--- list -->
    <li>item 1</li>
    <li>item 2</li>
    <!--- link -->
    <a href=""></a><br>
    <!--- image -->
    <img src="myphoto.jpg" />
    <!--- table -->
    <table border="1">
        <td>cell 1</td> <td>cell 2</td>
        <td>cell 3</td> <td>cell 4</td>

2. Form

Web development resources:
Code example:Html form with controls

The code below shows a form that contains all most used element types and when user click on the Submit form then form_response.htm will be called.

<FORM action="form_response.htm" method="post"> 
  <INPUT type="radio" value="red" name="color" >Red 
  <INPUT type="radio" value="blue" name="color" checked>Blue
  <INPUT type="radio" value="green" name="color">Green

  <input type="checkbox" name="quick" value="yes" checked>Expedite<br>
  <select name="comboOptions"> 
    <option value="opt1">Option 1</option>
    <option value="opt2" selected>Option 2</option>
  <select name="listOptions" size=2 multiple> 
    <option value="item1">Item 1</option>
    <option value="item2" selected>Item 2</option>

  Name: <input type="text" name="firstName">
  <input type="button" onclick="alert("Name selection not implemented") value="Select name"> 
  <button type="button" onclick="alert("Name selection not implemented")">Select name</button> 
  Password: <input type="password" name="pwd"><br>
  <INPUT type="submit" value="Submit form">

3. Cookies

Cookies explanation
Allows to store information in the browser that may be used next time when user visit the same site to display the content based on his last preferences.

- size up to 4k
- if domain is specified, valid for all files under an URI path e.g.
- to update cookie, just overwrite it value
- to invalidate cookie, set its expiration date to past

Cookies can be manipulated on the client side from JavaScript or on the server side from ASP or PHP.;
Enable cookies in IE

Cookies in JavaScript

Code example:Cookies

// Create 1 day valid cookie
document.cookie =
    "myKey=myValue +
    "; max-age=" + 60*60*24 + 
    "; path=/" +

// get all cookies
var allCookies=document.cookie; 

function getOneCookie(myKey)
 var searchKey = myKey + "=";
 var cookies = document.cookie.split(';'); // creates array of all cookies from "myKey1=myValue;myKey2=myValue2"
 for(var i=0; i<cookies.length; i++) 
   var cookie = cookies[i].trim();
   if (cookie.indexOf(searchKey)==0) return cookie.substring(searchKey.length, cookie.length);
 return "";

Cookies in ASP

Write cookie 
Response.Cookies("myKey").Expires=#June 16,2015#

Read cookie
<% myValue=Request.Cookies("myKey") %>

Cookies in PHP

Write 1 day valid cookie
<? setcookie("myKey", "myValue", time()+60*60*24); ?>

Read cookie
if (isset($_COOKIE["myKey"]))
   myValue = $_COOKIE["myKey"];

Cookies in C#

System.Web.HttpCookie cookie = Request.Cookies.Get("myKey");
if (cookie!=null)
    var value = cookie.Value;

4. Tooltip

You can set tooltip for DIV or SPAN section.

<div title="Tooltip text">hello</div>
<span title="Tooltip text">hello</span>