Beruflich Dokumente
Kultur Dokumente
Historically , the word markup has been used to describe annotation or other
required, how markup is to be distinguished from text, and what markup means.
SGML contd
level 1 HTML
HTML 2.0
HTML 3.0
HTML 3.2
HTML 4.0
Types Of HTML documents
Static
Dynamic
Directory Listing
Types Of HTML documents
1 Static Pages
Static pages are static HTML pages that are prepared in advance of
the request. The Web server returns the HTML pages to the User,
but takes no special action. The User requests a static page by
typing in an URL or by clicking a link pointing to an URL. The URL
request is sent to the server. The server responds by returning the
static HTML page.
Web Browser
http://www.vinay.com/home.html
When the user clicks on a button on a form , the data from the form is
sent to the Web Server.
Web Browser
http://www.vinay.com/add.dll?2,2
Add.dll
To your
problem is 2+2
=4
Internet
database
connector
Database
Client Server
Types Of HTML documents
3 Directory Listing
If users send queries without specifying a particular file, you can either
Create a default document for a web site or for a particular directory or
you can configure server for directory browsing.
The user can then jump to the appropriate file by clicking it in the directory listing.
Getting Started
Text Editor : Any text editor, if it can save in plain (ASCII) text will do. This
means that anything from Microsoft word 6.0, Notepad , UNIX vi will work.
All it has to do is save the documents in plain, flat, ASCII- style text .
Web Browser : Netscape navigator, NCSA Mosaic, MS IE, lynx , Mozilla Firefox,
EPIC /Chrome , Opera , Cello, Chimera, Web explorer, Net Crusier. etc
Graphic Tool : Though you can draw pictures with no problem in paint brush
or MS PowerPoint , but to get them into the right format (GIF, PNG) you need
A graphic tool such as Adobe Photoshop. There are a number of format
Converters are present in market.
HTML
- Basics
- HTML Elements - Paragraphs
- HTML attributes - Line Breaks
- Lists
- Headings - HTML formatting tags
- Tables
- Horizontal Ruler - Links Hyperlinks and Anchors
- Forms
- HTML comments - The Image Tag
Hyper Text Markup Language (HTML)
The first tag in pair is the start tag, the second tag is the end tag
The text between the start and end tags is the element content
HTML tags are not case sensitive , <b> means the same as <B>
Note :
Example :
<html>
<body>
<h1> My first HTML page </h1>
<p> Ready to start with HTML </p>
</body>
</html>
HTML Elements
HTML documents are defined by HTML elements . An HTML element
Is everything from the start tag to the end tag.
<br/>
* The start tag is often called as opening tag and the end tag as often called as closing tag
HTML Element syntax
- An HTML element starts with a start tag / opening tag
- An HTML element ends with an end tag / closing tag
- The element content is everything between the start and the end tag
- Some HTML elements have empty content
- Empty elements are closed in the start tag
- Most HTML elements can have attributes
HTML ATTRIBUTE
<HTML>
Example :
<BODY BGCOLOR=#rrggbb>
Document content
</BODY>
</HTML>
All HTML documents are composed of four parts :
The main body of the document which contains the actual document
content. ( the body can be within either <BODY> or <FRAMESET> elements.)
Document Structure Elements
e <HEAD> .. </HEAD>
ements do not affect the look of the document when rendered.
<HTML>
<HEAD><TITLE> Sample Document </TITLE> </HEAD>
<BODY></BODY>
</HTML>
Body Section
The body section is opened and closed by the <BODY> and /BODY>
tags.
The text and images of the document itself to be displayed by the Web
Browser, should be placed within these two tags.
The opening tag should be placed immediately after the closing head
tag (</head>) and before any images or text included in the document.
A closing tag ends the body section and should be placed at the end of
the document after any images or text included in it.
Headings
Headings are important for any document. HTML has 6 headings tags
defined from <h1> to <h6>
Use HTML headings for headings only. Dont use headings to make text
BIG or BOLD
Search engines use your headings to index the structure and content of
your WebPages.
<h1> defines the largest headings . <h6> defines the smallest headings
<body>
<h1> heading 1 </h1>
<h2> heading 2 </h2>
<h3> heading 3 </h3>
<h4> heading 4 </h4>
<h5> heading 5 </h5>
<h6> heading 6 </h6>
sample line without using headings
</body>
</html>
Horizontal Rule
Attributes:
<body>
By default all text within the paragraph will be aligned to the left side
of the page Layout.
<body>
</body>
</html>
Attribute Value Description
Use the <br /> tag if you want a line break ( anew line) without
starting a new paragraph.
The <br /> element is an empty HTML element. It has no end tag.
Even if <br> works in all browsers, writing <br /> instead is more
future proof
<html>
Example 004
<head>
<title> Line Break </title>
</head>
<body>
</body>
</html>
HTML Formatting Tags
HTML uses tags like <b> and <i> for formatting output, like bold or
Italic text. These HTML tags are called formatting tags. The list of the
formatting tags is as given below
Tag Description
<b> Defines bold text
<big> Defines Big Text
<em> Defines emphasized text
<i> Defines italic text
<small> Defines small text
<strong> Defines strong text
<sub> Defines subscripted text
<sup> Defines superscripted text
<ins> Defines inserted text
<html>
Example 005
<head>
<title> Formatting tags 1</title>
</head>
<body>
<html>
<head >
<title > Marquee tag example </title>
</head>
</marquee>
Block Formatting Tags
Preformatted text :
The preformatted text element presents blocks of text in fixed-width
font.
<pre>
Department Number of employees Department code
-------------------------------------------------------------------------------
Finance 25 252
Marketing 27 456
Production 33 234
Operations 22 235
HRD 35 236
------------------------------------------------------------------------------
</pre>
Block Formatting Tags
CENTER : all lines of text between the beginning and end
<CENTER>
elements are centered between the current left and right
margins.
Ex :
<center>
margins.
</center>
Example :
Note : the element content does not have to be text . You can
link from an image or any other HTML element.
Href attribute
An email works the same way as the links to web pages. Instead of
specifying a page address in the href attribute. We specify an email
address. Also an email link uses the mailto: protocol which invokes
email programs.
Example :
<html>
<head> <title> Email Link example </title> </head>
<body>
<a href=mailto:vinay.m@christuniversity.in> Mail Me Back </a>
</body>
</html>
Example file : 010 img.html
The IMAGE tag
In HTML, Images are defined with the <img> tag
The <img> tag is empty , which means that it contains attributes only
and it has no closing tag.
To display an image on a page , you need to use the src sttribute .
(src stands for source)
1. Src attribute
Syntax : <img src=url />
2. Alt attribute
Syntax : <img src=Sunflower.jpeg alt=A Big sunflower Image>
* The alt attribute tells the reader what he or she is missing on a page if the browser cant load
image. The browser will then display the alternate text instead of the image.
1. Create two web pages and type content in each page , insert
images in each page and link them
Use Marquee
Header tags
Image tag
and formatting tags
LISTS
Lists tags causes standard items ( such as bullets or numbers ) to be
Inserted before the listed text.
They can be nested within one another To create sub-lists (the effect of this on
the appearance of a document (differs with the browser used) the text of a list
entry uses the same style and fonts as normal text.
The three types which can be specified in a <UL> list tag are :
TYPE: Disc
TYPE: Circle
TYPE: Square
Type =
A = A,b,C i = i,ii,iii
a = a,b,c 1= 1,2,3
I = I,II,III
Definition List
A menu list is a list of items with typically one line per item. The menu
List style is more compact than the style of an unordered list.
Example :
<MENU>
<LI> FIRST ITEM
<LI> SECOND ITEM
<LI> THIRD ITEM
</MENU>
Nested Lists
Lists can bee nested within each other. The effect of this on the
appearance of a document varies with the browser used to view it.
John 40000
Table Data
Anthony 50000
Table Cells
Tables
Table Tag is used to generate a row/cell matrix within the document .
All table related tags occur between the <TABLE> and </TABLE>
container tags.
Any table related tags occurring outside of these tags will be ignored.
<TABLE>
<TR>
<TD> content </TD>
</TR>
</TABLE>
A table header cell is defined with the <TH> and </TH> tag pair.
The contents of the table header cells are automatically centered and
appear in boldface.
Frames extend the layout flexibility of web pages by allowing the visible
Client area to be divided into more than one sub-region.
Each frame has several properties :
It can load a URL independently of the other frames
It can be given a NAME allowing it to be targeted by other URLs
It resizes itself dynamically in response to changes in the size of visible
client area and it can choose to allow or disallow itself to be manually
resized by the user.
Frame enabled web pages can be generated using two basic tags :
FRAMESET tags and FRAME tags whereas <NOFRAME> tag is used to
Specify a section of a document that will be used by browsers that cant
use frames.
FRAME document
A frame document has a basic structure very much like your normal HTML
Document.
The BODY container is replaced by FRAMESET container which describes
the sub-HTML documents or frames that will make up the page.
<HTML>
<HEAD </HEAD>
<FRAMESET>
..
</FRAMESET>
</HTML>
FRAMESET ELEMENT
Frame syntax is similar in scope and complexity to the used by tables and
has been designed to be quickly processed by browsers.
Cols : the cols attribute takes as its value a comma separated list of values
that has exact syntax as the list described for rows attribute.
Example 0
Example 2 Example 3
Example 1
Example 4
*Note : Frameset can be nested also
The FORM element <Form> </Form>
There can be several forms in a single document but the FORM element
Control cant be nested .
The address of the program that will handle the form contents
( ACTION )
Example :
<FORM ACTION=http://www.iit.com/cgi/postquery
METHOD=POST >
METHOD ATTRIBUTE
After specifying the URL to process the form the next question arises is
how to submit the form to the address specified in the ACTION Attribute.
METHOD attribute of the form element handles this by using two predefined
methods GET and POST . The default method if not specified is GET.
GET METHOD
GET method appends the form data to the end of the URL of the processing Script
specified in the method attribute itself.
The get method is not very secure since the data input appears in the URL.
There is limitation to just how much data can be passed with GET method.
It is impossible to append 10000 word essay at the end of a URL as most browsers limit
a URL to several thousand characters.
POST METHOD
POST on the other hand sends the form data as separate section following the HTTP
header.
In a situation where a large amount of information must be passed back, the POST
method is preferred.
The POST method transmits all form input information immediately after the requested
URL.
[ Once the server has received the request from a form using POST it knows to continue
listening for the rest of the information ]
ENCTYPE Attribute
The ENCTYPE attribute specifies the format of the submitted data in case the
protocol does not impose a format itself.
When data is passed from a web server , it is typically encoded just like an URL
INPUT Element
The input element is a basic form element used to create form controls for user input.
Ex:
<FORM METHOD=POST ACTION=mailto:vinay@gamil.com>
<input type=text name=name1 size=50>
<input type=radio name=rd1 >
<input type=submit value=submit