Pages

Thursday, August 30, 2012

Links, Images, Sounds, Video


Links
The <link> tag defines the relationship between a document and an external resource.The <link> tag is most used to link to style sheets.

In HTML the <link> tag has no end tag.

In XHTML the <link> tag must be properly closed.

Example
Link to an external style sheet:
<head>
<link rel="stylesheet" type="text/css" href="theme.css" />
</head>

Images
The <img> tag defines an image in an HTML page. The <img> tag has two required attributes: src and alt.
In HTML the <img> tag has no end tag.

In XHTML the <img> tag must be properly closed.

Example
How to insert an image:
<img src="smiley.gif" alt="Smiley face" height="42" width="42" />

Sounds
The sound tag is used to insert a sound to be played while someone is viewing a page.

<sound src="">
Description
     The src attribute is used to define the source of the sound file. Here you would enter the file name if the file is in the current directory, or the file path and file name if it is in a separate directory.   
Code
     <sound src="FILENAME.wav"></sound>
Appearance
     YOUR TEXT HERE

<sound loop="">
Description
     The loop attribute allows you to specify that the sound will loop for an infinite amount of time.   
Code
     <sound loop="infinite"></sound>

<sound delay="">
Description
     The delay attribute allows you to delay the sound from playing for a specified number of seconds after the page and sound finish downloading.   
Code
     <sound delay=20></sound>

Video
The <embed> Tag
The purpose of the <embed> tag is to embed multimedia elements in HTML pages.
The following HTML fragment displays a Flash video embedded in a web page:

Example
<embed src="intro.swf" height="200" width="200"/>

No comments:

Post a Comment