Thursday, 9 February 2017

Tables
Example
Basic Table Elements and Attributes
Grouping Sections of a Table
Splitting Up Tables Using a Head, Body, and Foot
Nested Tables
Accessible Tables


Tables
Display information in rows and columns
Used to display all manner of data that fits in a grid such as train schedules, television listings, financial reports, and sports results.
A row is made up of a set of cells on the same line from left to right
A column is made up of a line of cells going from top to bottom.
You create a table in XHTML using the < table > element.
Inside the < table > element, the table is written out row by row.
A row is contained inside a < tr > element — which stands for table row .
Each cell is then written inside the row element using a < td > element — which stands for table data .
Start each row and cell on a new line and to indent table cells inside table rows








Basic Table Elements and Attributes

< table >
The < table > element is the containing element for all tables. It can carry the following attributes:
All the universal attributes
Basic event attributes for scripting
dir
Indicate the direction of text
Possible values are ltr for left to right text and rtl for right to left
  dir=“ltr
Summary
Provide a summary of the table ’ s purpose and structure
  summary=”Table shows the operating profit for the last four quarters. The first column indicates the quarter, the second indicates outgoings, the third indicates receipts, and the fourth indicates profit.”



< tr >
Used to contain each row in a table
Carry five attributes, three of which have been deprecated in favor of using CSS.
  align bgcolor char charoff valign
char
Specify that the contents of each cell within the row will be aligned around the first instance of a particular character
  char=”.”
< td > and < th >
Elements Represent Table Cells
< th > element are usually displayed in a bold font
<td> displayed left - aligned and not in bold
< td > and < th > elements can also carry the following attributes:
abbr align axis bgcolor char charoff colspan headers height nowrap rowspan scope valign width
< caption >
Table should have a caption so that visitors to your site know what the table is for.
appears directly after the opening < table > tag
Associate the content of the table with its description




Splitting Up Tables Using a Head, Body, and Foot

< thead> to create a separate table header
<tbody> to indicate the main body of the table
<tfoot> to create a separate table footer
Note that the < tfoot> element must appear before the < tbody> element in the source document.


Accessible Tables

Ensure your tables are easy to understand with following:
Add captions to your tables
Always try to use the < th > element to indicate a table heading
Always put headings in the first row and the first column
Avoid using nested tables
Avoid using rowspan and colspan attributes
Learn how a voice browser or screen reader would read a table, and the order in which the cells are read out;
If you use the scope and headers attributes to clearly indicate which headings apply to which rows and columns, then screen readers can help users retrieve headings for a particular cell. 



Wednesday, 8 February 2017

HTML Concepts

HTML Documents
HTML documents contain HTML tags and plain text
HTML documents are also called web pages

Hyper Text 
A method by which you move around on the web - by clicking on special text called hyperlinks which bring you to the next page.
You can go to any place on the Internet whenever you want by clicking on links
There is no set order to do things in.

Markup 
It is what HTML tags do to the text inside them. They mark it as a certain type of text .

HTML Tags
HTML markup tags are usually called HTML tags
HTML tags are keywords (tag names) surrounded by angle brackets like <html>

HTML tags range from formatting commands to controls that allow user input

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
The end tag is written like the start tag, with a forward slash before the tag name
Start and end tags are also called opening tags and closing tags
Example
  <tagname>  content </tagname>

HTML ELEMENTS
"HTML tags" and "HTML elements" are often used to describe the same thing.
But strictly speaking, an HTML element is everything between the start tag and the end tag, including the tags
Example:
  <p>This is a paragraph.</p>


HTML vs X HTML
HTML
HTML is an application of SGML (Standard Generalized Markup Language)
Allows an author to omit certain tags and use attribute minimization
X HTML
The Extensible Hyper Text Markup Language, or
X HTML, is an application of XML (Extensible Markup Language)
It doesn’t permit the omission of any tags or the use of attribute minimization
Basically, X HTML is HTML (all the html tags are found in X HTML) that follows the rules of XML (because it is a family of XML).
For example, while <br> is valid in HTML, it would be required to write <br /> in X HTML.

XHTML
All tags must be in lower case
All documents must have a doc type
All documents must be properly formed
All tags must be closed
All attributes must be added properly
Attributes cannot be shortened
All tags must be properly nested 
The <!DOCTYPE> Declaration

The <!DOCTYPE> declaration tells browser that this is an HTML page.
There are many different documents on the web, and a browser can only display an HTML page 100% correctly if it knows the HTML type and version used.
HTML5 Example:
<!DOCTYPE html>

Tuesday, 7 February 2017

Web Server
It is a computing server that enables HTTP access to a web site.
A web server runs many additional  services behind the scene, e.g., a database, a server application framework, authentication, etc.
Web server refer to either the hardware (the computer) or the software (the computer application) that helps to deliver web content that can be accessed through the Internet.
The term web server or
webserver can mean one of two things:
A computer program that accepts HTTP requests and return HTTP responses with optional data content.
A computer that runs a computer program as described above. 

Web Server Components
A web server typically include the following major components:
networking support : sending responses and receiving requests over the network;
address/domain resolution : analyzing the correct IP address for the requested (virtual) domain, authenticating if necessary;
request processing : serving static or dynamic content as appropriate;
response generation : building the response and passing it to the networking component.

Web Server Workflow
A web server has the following workflow steps:
1.receive a HTTP request;
2.translate the resource “path” based on the requesting URL;
3.check access based on the requested information;
4.validate the user id and authenticate the user if necessary;
5.determine the MIME (Multi-purpose Internet Mail Extensions) type of the requested resource;
6.generate the dynamic response if needed, i.e., running local scripts;
7.send response back
8.log the request.

URI(Uniform Resource Identifier )

It contains four distinct parts: the protocol 
type, the machine name, the directory path and the file name.
URI stands for Uniform Resource Identifier. URI is a text which is used to identify any resource or name in Internet.
URI has two specialization in form of URL (Uniform Resource Locator) and URN (Uniform Resource Name) to identify resource and name.





URI(Uniform Resource Identifier )

URL (Uniform Resource Locator)

Location dependent and is a subset of URI or Uniform Resource Identifier.
Includes location as well as protocol to retrieve the resource e.g. in http://abc.com/foldarname/filename.html, HTTP is a protocol which can be used to retrieve resource filename.htm available in location http://abc.com directory.
There are several kinds of URLs: file URLs, FTP URLs, and HTTP URLs.
It's not necessary that URL always include http as protocol, it can use any protocol e.g. ftp://, https://

URN (Uniform Resource Name)

URN is also subset of URI. One of the best example of URN is ISBN number which is used to uniquely identify a book.
URN is completely different than URL as it doesn't include any protocol




Monday, 6 February 2017

Web Browser

A Web browser is a software application which enables a user to display and interact with text, images, videos, music, games and other information typically located on a Web page at a Web site on the World Wide Web.
Text and images on a Web page can contain hyperlinks to other Web pages at the same or different Web site.
Web browsers allow a user to quickly and easily access information provided on many Web pages at many Web sites by traversing these links.
Web browsers format HTML information for display, so the appearance of a Web page may differ between browsers.
Internet Explorer, Opera, Mozilla Firefox, Google Chrome



Brower - Server communications

§Type the URL in the web browser. If the URL contains a domain name, the browser first connects to a domain name server and retrieves the corresponding IP address for the web server.
§The web browser connects to the web server and sends an HTTP request (via the protocol stack) for the desired web page.
§The web server receives the request and checks for the desired page. If the page exists, the web server sends it. If the server cannot find the requested page, it will send an HTTP 404 error message. (404 means 'Page Not Found')


§The web browser receives the page back and the connection is closed.

§The browser then parses through the page and looks for other page elements it needs to complete the web page. These usually include images, applets, etc.

§For each element needed, the browser makes additional connections and HTTP requests to the server for each element.
When the browser has finished loading all images, applets, etc. the page will be completely loaded in the browser window.

Universal Resource Location (URL)















Domain Names and Address Resolution

To connect from computer A to computer B an IP address is used
Usually people do not use IP addresses directly to access other computers
Domain Name Service or DNS distributed database is used to map names to IP addresses


DNS: Domain Name Service
DNS is a distributed database of computers’ names and their corresponding IP addresses
DNS servers are used to host the DNS database and software to use it
Since the DNS database is too large to be stored on any specific computer only a subset of the database is usually kept on any DNS server


Name à IP Address
The job of the DNS server is to map the name to an IP address
If the DNS server can not resolve the domain request (because it does not have it in its part of the database) then it redirects the request to a different DNS server


Hypertext Transfer Protocol (HTTP)



HTTP is a request/response standard of a client and a server.
The client making a HTTP request—using a web browser, spider, or other end-user tool—is referred to as the user agent.
The responding server—which stores or creates resources such as HTML files and images—is called the origin server.
HTTP is a connection-less text based protocol.

Hypertext Markup Language (HTML)

It provides a means to describe the structure of text-based information in a document—by denoting certain text as links, headings, paragraphs, lists, etc.—and to supplement that text with interactive forms, embedded images, and other objects.
HTML is written in the form of "tags" that are surrounded by angle brackets.
HTML can also describe, to some degree, the appearance and semantics of a document, and can include embedded scripting language code (such as JavaScript) that can affect the behavior of Web browsers and other HTML processors.