This document provides an overview of static web documents and markup languages. It discusses HTML, the basic building block of the World Wide Web, and how it uses tags to structure and format web pages. It also covers advantages of markup languages like HTML, how they allow browsers to reformat pages across different displays. The document outlines key HTML tags and concepts like headings, hyperlinks, forms, tables, and images. It then introduces XML and XSL as languages to structure web content separately from formatting. Finally, it discusses XHTML as the next evolution of HTML and key differences between HTML and XHTML.
2. CONTENTS:
1. Introduction
2. HTML
3. Advantages Of Markup Language
4. Hyperlinks
5. Forms of HTML
6. XML and XSL
7. XHTML
8. Differences between HTML and XHTML
12/16/15
3. INTRODUCTION:-
The basis of web is transferring web pages from server to client.
Web pages are static , that is just files sitting on some server and
waiting to be retrieved.
For example, video is a static web page because it is just a file.
4. HTML-The Hyper Text Markup Language
Web pages are currently written in language called HTML.
It allows users to produce web pages that include text , graphics,and
pointer to other web pages.
It is used to describe how the documents are formatted.
Markup language contains explicit commands for formatting.
For example,
<b> - means start boldface mode,
</b> - leave boldface mode.
5. Advantage of Markup language
Markup language over one with no explicit markup is that writing a
browser for it is straight forward , i.e. the browser simply has to
understand the markup commands.
TeX and Troff are well known examples of markup languages.
By embedding the markup commands within each HTML file and
standardizing them , its becomes possible for any web browser to read
and reformat any web pages.
Reformatting web pages is crucial because page may be produced in
1600x1200 window with 24-bit colour but may have to be displayed in
640x320 window configured for 8-bit colour.
6. HTML documents can be written in with any standard editor, and also
special HTML editor or word processor.
A web page consists of head and body, enclosed by <html> and
</html>.
7. As we can see above head is bracketed by <head> and </head> and
body is bracketed by <body> and </body> tags.
The strings inside the tags are called directives.
Most of the browsers have a menu item VIEW SOURCE which displays
the current page’s HTML source, instead of its formatted output.
Tags can be either lower case and upper case
Example:<head> or <HEAD>- both are same
But newer versions require lower case only.
HTML parses ignore extra spaces extra space and carriage returns since
they have to reformat the text to make if fit the current display area.
Some tags have parameters called attributes
For example, <img src="abc”alt=“foobar”> is a tag ,<img>, with
parameter src set equal to abc and parameter alt set equal to foobar.
where src-gives URL of image,<img> tag specifies image to be displayed
in current position in the page.
In practice all browsers support GIF and JPEG files.
8. 12/16/15
Other parameters of image are align- which controls the alignment of
image.
Technically , HTML documents are written in the ISO 8859-1 Latin-1
character set, but for users whose keyboard support only ASCII,
escape sequences are present for special characters, such as e`.
All of them begin with & and end with semicolon (;).
For example,   –produces a space.
Headings are generated by an <hn> where n is digit in the range 1 to
6.(<h1> to <h6>)
The lowered numbered heading displayed in a larger and heavier font.
The browser may also choose different colour for each level of
heading.
If the browser is not capable displaying boldface and italics, it must
use other methods for rendering them.
For example using a different colour for each or perhaps reverse
video.
11. HYPERLINKS:
This uses the <a> (anchor) and </a> tags.
<a> has also parameters like herf(the URL) and name(the hyperlinks
name)
The text between <a> and</a> is displayed.
If it is selected, the hyperlink is followed to a new page.
It is also permitted to put an image there and also by clicking on
image hyperlink activates.
For example,
<a herf=” http://www.nasagov ”>NASA’s home page</a>.
It displays the following
NASA’s home page
12/16/15
12. A second example
<a href=“http://www.nasagov”><img src=“shuttle.gif” alt=”nasa”></a>
When displayed the page shows a picture ,by clicking on it it switches
to NASA’s home page.
HTML keeps evolving ,HTML 1.0,HTML 2.0 did not have tables but they
were added in HTML 3.0.
A HTML table consists of one or more rows each consisting of one or
more cells.
Cells contain a wide range of material , including text ,figures ,icons ,
photographs and even other tables.
Cells can be merged, for example headings can span multiple
coloumns
12/16/15
15. This example just shows the few basic features of HTML tags.
Tables are started by the <table> tag.
<caption> tag- used to provide caption.
<tr>-table row(row begins with this tag).
<th>(table header) or <td>(table data)-individual cells are marked.
Numerous attributes are also allowed in tables.
They include way to specify horizontal and vertical cell alignments
The HTML 4.0 there are more features added.
These include accessibility features for handicapped users,other
object embedding support for scripting languages.
when website consists many pages produced by multiple authorsnin
same company,it is oftendesirable to have a way to prevent different
pages from having a different appereance
This problem can be solved by style sheets, when these are used
individual pages no longer use physical styles sucha s
boldfaces,italics.
12/16/15
16. FORMS OF HTML:
HTML Forms are used to select different kinds of user input.
A form is an area that can contain form elements.
Form elements are elements that allow the user to enter information
like,
1. text fields,
2. text area fields,
3. drop-down menus,
4.radio buttons,
5. checkboxes,
6. Action Attribute and the Submit Button,etc.
12/16/15
17. Text Fields:
Text fields are used when you want the user to type
letters, numbers, etc. in a form.
Example :
<form>
First name: <input type="text" name="firstname" /> <br />
Last name: <input type="text" name="lastname" />
</form>
Output:
12/16/15
First name :
Last name :
19. Action Attribute and the Submit Button :
When the user clicks on the "Submit" button, the content of the form
is sent to the server.
The form's action attribute defines the name of the file to send the
content to.
It depends on PHP File.
<form name="input" action="html_form_submit.asp" method="get">
Username:<input type="text" name="user"/>
<input type="submit" value="Submit" />
</form>
20. XML and XSL:
HTML without forms does not provide any structure to web pages.
It also mixes the content with formatting.
An e-commerce and applications become more common, there is an
increasing need for structuring web pages and separating the content from
formatting.
With web pages in html, it is very difficult for a program to figure out where
the title is and the price is.
For the above reason W3C has developed an enhancement to HTML to allow
web pages to be structured for automated processing.
Two new languages has been developed for this purpose .
1.XML-eXtensible markup language-describes web content in a structured way
2.XSL-eXtensible style language-describes the formatting independently of
the content.
21. Consider an XML document.
It defines a structure called book_list,which Is a list of books.
Each book has three fields, the title ,author, and year of publication.
It is permitted to have repeated fields, optional fields and alternative feilds.
Each of three fields are permitted to have sub fields.
12/16/15
22. In above example it is described how to display the page on the screen.
To provide formatting information we use second file,book_list.xsl.
This file is the style sheet that tells how to display the page
An XSl file for formatting XML document is given below
23. The XML and XSL specifications are much stricter than HTML
specification.
They state that rejecting syntactically incorrect files is mandatory ,
even if browser can determine what the web designer meant.
A browser that accepts an incorrect XML or XSL file and repairs itself
will be rejected in a conformance test.
Browsers are allowed to pinpoint the error.
Web pages in XML and XSL are still static since they simply contain
instruction to the browser how to display the web pages.
XML can be used for other purposes other than describing web pages.
One of the use of it is language for communication between
application programs.
SOAP(Simple Object Access Protocol) is a way for performing RPCs
between applications in language and system independent way.
The client sends XML message to server using HTTP protocol and
server sends reply as an XML formatted message. 12/16/15
24. XHTML-eXtended HyperText Markup
Language
HTML keeps evolving to meet the new demands.
The next step of HTML 4.0 is a language that is very picky.
It is called XHTML-(The eXtended HyperText Markup Language) rather
than HTML 5 because it is essentially HTML 4 is reformulated in XML.
XHTML is a new web standard and should be used for all new web
pages to achieve maximum portability across platform and browsers.
12/16/15
25. Differences between HTML and XHTML:
1. HTML pages and browsers must strictly conform to the standard . No
more shoddy web pages and this is inherited from XML.
2. All tags and attributes must be in lower case . Tags like<HTML> are
not allowed in XHTML . The use of tags<html> is mandatory.
3. Closing tags are required even for </p>.For tags that have no natural
closing tag such ad <br>,<hr> ,<img> ,a slash much preceede the
closing”>”.
4. Attributes must be contained within quotation marks.
5. Tags must nest properly . Tags must be closed in inverse order that
they were opened.
6. Every document must specify its document type.
12/16/15