Sie sind auf Seite 1von 18

HTML

HTML is the standard language that the Web uses for creating and recognizing documents.

HTML is a markup language that is used to create an HTML document. The instructions specify how a Web page should be displayed in a browser.

HTML

Tag - Used to specify ("mark-up") regions of HTML documents for the web browser to interpret. Tags look like this: <tag> Element - A complete tag, having an opening <tag> and a closing </tag>. Attribute - Used to modify the value of the HTML element. Elements will often have multiple attributes.

HTML
Use of HTML tags and elements
1. Control the appearance of the page and the
content. 2. Publish online documents and retrieve online information using the links inserted in the HTML document. 3. Create on-line forms. These forms can be used to collect information about the user, conduct transactions, and so on. 4. Insert objects audio-clips, video clips, ActiveX components, java applets in the HTML document.

Growth of the Web Depends on Hypertext the ability to link to other documents Hypermedia the ability to include text, audio, video, images and graphics in a document.

Designing A Web Site


A web site is a collection of web pages and related files and folders stored on a Web server. The first page of the web site is called the home page or index page. The home page gives an overview of the information that we can search for on the web site. When developing a web site, we go through the design phase.

HTML Tags
The HTML commands are called TAGS. The TAGS are used to control the content and appearance of the HTML document. The opening tag is a pair of brackets <>. This indicates the beginning of the HTML command. The closing tag is represented as </> to indicate the end of the HTML command.

HTML Tags
The HTML tag is used to mark the beginning and end of an HTML document. <HTML>


</HTML>

The tags are not case (upper/ lower) sensitive.

The HTML tag is comprised of :


<ELEMENT ATTRIBUTE = VALUE>

Element identifies the tag.


Attribute describes the tag.

Value is the content that is assigned to the attribute.


Example <BODY BGCOLOR =WHITE>

HTML Rules and Guidelines


The following are some rules to remember when writing HTML : HTML documents have a well-defined structure. HTML elements should occur only within others. List items (<LI>) should be the only items that directly nest within unordered list elements defined by <UL>. EXAMPLE <UL>

<LI> </LI>
</UL>

HTML Rules and Guidelines


Elements names are not case-sensitive. EXAMPLE

An element such as <hTml> is equivalent to <html> or <HTML>.


Attribute names arent case-sensitive. EXAMPLE <HR NOSHADE> is equivalent noshade> or <HR NoShade>. to <HR

Attribute values may case-sensitive.


EXAMPLE

The filename in
<IMG SRC=filename.gif> is not the same as the filename in <IMG SRC=FILENAME.GIF>

Attribute values should be quoted. Attribute values may contain spaces or other special characters if it is enclosed by quotes.
EXAMPLE The following value ALT attribute of the <IMG> tag contains spaces and therefore require quotes:
<IMG SRC =univ.gif ALT =University of
Dhaka>

Element names cannot contain spaces.

EXAMPLE
INCORRECT CORRECT

<BOD Y>

<BODY>

Browsers treat the first space encountered inside an element as the end of an elements name and the beginning of its attributes.

Browsers ignore space characters in HTML content Space characters convey no formatting information, unless they occur inside a special preformatting element, such as <PRE>, which preserves their meaning. EXAMPLE <PRE> UNIVERSITY

OF
DHAKA </PRE>

Elements should nest. Any element that starts within another element must also end within that element.
EXAMPLE
INCORRECT
<B><I>Not correct</B></I>

CORRECT
<B><I>Correct</I></B>

The <HTML> Element


The <HTML> element delimits the beginning and the end of an HTML document. It contains only the <HEAD> element and the <BODY> element. The <HTML> is a container for all other elements. The <HEAD> element is optional.

The <HEAD> Element


The <HEAD> element encloses a document section that contains identification and supplementary information about the document. The elements allowed <HEAD>element includes within the

<TITLE>. The always occur.

<TITLE>

element

must

The <BODY>Element
The body of a document is <BODY> and </BODY> tag. defined by

Only one <BODY>element can appear per document.

Common attributes for the<BODY>element :


TEXT for text color

BGCOLOR for background color


LINK for unvisited link color

Das könnte Ihnen auch gefallen