c h 07: m ore a bout html tharith sriv. o utline you have already learnt almost everything in html....

24
CH 07: MORE ABOUT HTML Tharith Sriv

Upload: mildred-copeland

Post on 13-Dec-2015

214 views

Category:

Documents


1 download

TRANSCRIPT

CH 07: MORE ABOUT HTML

Tharith Sriv

OUTLINE

You have already learnt almost everything in HTML.

In this chapter, you will learn more about: An HTML tag “META” Attributes of <BODY>

You will also be guided to complete your project.

THE <META> TAG

In HTML, <META> specifies information about the document to browsers, applications, search engines.

The tag <META> is placed within the document head. For example, you can use <META>

tag to instruct browser to load new document after 10 s.

THE <META> TAG

You use <META> to instruct browser.

You can specifies keywords for search engines to associate with your documents.

ATTRIBUTE OF <META>

CONTENT=“..”Assigns values to HTTP header filed.

When using the REFRESH HTTP header, assign a number along with a URL; the browser then loads the specified URL after the specified number of seconds.

ATTRIBUTE OF <META>

See the example below:

With this example, the new page nextpage.html will appear in the same browser after 2 seconds.

ATTRIBUTE OF <META>

HTTP-EQUIV=“..”This indicates the HTTP header value you want to define, such as Refresh, Expires, or Content-Language.

See the example below:

ATTRIBUTE OF <META>

NAME=“..”Specifies the name of the association you are defining, such as Keywords or Description. .

See the example below:

THE <BODY> TAG

You have already learnt about <BODY>.

However, some attributes are new for you.

Next slides show ATTRIBUTES of <BODY> tag.

ATTRIBUTE OF <BODY>

ALINK=“#RRGGBB”Indicates the color of hyperlink text while the text is selected.

Color names can substitute for the RGB hexadecimal values.

ATTRIBUTE OF <BODY>

LINK=“#RRGGBB”Indicates the color of hyperlink text within the document, which corresponds to documents not already visited by the browser.

Color names can substitute for the RGB hexadecimal values.

ATTRIBUTE OF <BODY>

VLINK=“#RRGGBB”Indicates the color of hyperlink text within the document, which corresponds to documents already visited by the browser.

Color names can substitute for the RGB hexadecimal values.

ATTRIBUTE OF <BODY>

TEXT=“#RRGGBB”Indicates the color of normal text within the document.

Color names can substitute for the RGB hexadecimal values.

ATTRIBUTE OF <BODY>

BACKGROUND=“URL”Specifies the relative or absolute location of an image file that tiles across the document’s background.

See the example below:

ATTRIBUTE OF <BODY>

BGCOLOR=“#RRGGBB”Indicates the color of a document’s background.

Color names can substitute for the RGB hexadecimal values.

ATTRIBUTE OF <BODY>

BGPROPERTIES=“FIXED”Specifies the behavior of the background image

BGPROPERTIES= FIXED indicates that the background image remains in place as you scroll the document, creating a watermark effect.

ATTRIBUTE OF <BODY>

CLASS=“..”Indicates which style class applies to the <BODY> element.

An example of this can be seen below:

ATTRIBUTE OF <BODY>

ID=“n”Assigns a unique ID selector to the <BODY> tag.

See below:

ATTRIBUTE OF <BODY>

LEFTMARGIN=“n”Specifies the width (in pixels) of a margin of white space along the left edge of the entire document.

ATTRIBUTE OF <BODY>

TOPMARGIN=“n”Specifies the size (in pixels) of a margin of white space along the top edge of the entire document.

ATTRIBUTE OF <BODY>

SCROLL=“YES, NO”Indicates whether scrolling is possible within the document body.

See the example below:

ATTRIBUTE OF <BODY>

STYLE=“…”Specifies Style Sheet commands that apply to the document body.

See example.

ATTRIBUTE OF <BODY>

TITLE=“…”Specifies text assigned to the tag. You might use this attribute for context-sensitive help within the document.

Browsers may use this to show tool tips.

ATTRIBUTE OF <BODY>

Other AttributesThis tag also accepts the lang, dir, onload, onunload, onClick, onDblClick, onMouseDown, onMouseUp, onMouseOver, onMouseMove, onMouseOut, onKeyPress, onKeyDown, and onKeyUp attributes.