Académique Documents
Professionnel Documents
Culture Documents
Save the HTML (extension of .htm or .html) Display your HTML document in WWW browser window Check your work and modify as necessary Place it on the Web.
Save the HTML (extension of .htm or .html) Display your HTML document in WWW browser window Check your work and modify as necessary Place it on the Web.
When a WWW browser displays a page it reads from a text file, and looks for special codes or "Tags" that are marked by the < and > signs The general format for a HTML tag is: <tag name>string of text</tag name> As an example, the title for a section may use a header tag that looks like the following: <h3>What are HTML tags?</h3> This tag would tell a WWW browser to display the text "What are HTML tags?" in the style of header level 3
Classification of Tags
Singular Tags :- Those tags which have only opening tag not having closing tags e.g. < br > < hr > etc Paired Tags : - Those Tags which have both opening & closing tags e.g. < body > < / body > etc.
< html > < / html > Opens and closes the HTML document. < title > < / title > This is the title of your page and will appear at the top of your browsers window. < head > </ head > what you are not going to see on page. < body > < / body > what are you going to see on page. <h1 > </ h1> to <h6> </h6> Heading Tags <b> text </b> Bold text. <i> text </i> Italic text. <u> text </u> Underline text. <br> (no closing) Line break. <hr> (no closing) Horizontal line.
HTML elements can have attributes Attributes provide additional information about the element Attributes are always specified in the start tag Attributes come in name/value pairs like: name="value"
Value
image Name Color name Color name
Description
Specifies a background image for a document Specifies a background color for a document Specifies a background color for a document
Example
background = 1 . Jpg bgcolor= red text = black
link
alink vlink
Color name
Color name Color name
link = cyan
alink = cyan vlink = cyan
Codes
#90EE90
#D3D3D3
#F0F8FF
#FAEBD7
lightgreen
lightgrey
aqua
aquamarine azure beige bisque black blanchedalmond blue blueviolet brass * brown burlywood
#00FFFF
#7FFFD4 #F0FFFF #F5F5DC #FFE4C4 #000000 #FFEBCD #0000FF #8A2BE2 #B5A642 #A52A2A #DEB887
lightpink
lightsalmon lightseagreen lightskyblue lightslategray lightsteelblue lightyellow lime limegreen linen magenta maroon
#FFB6C1
#FFA07A #20B2AA #87CEFA #778899 #B0C4DE #FFFFE0 #00FF00 #32CD32 #FAF0E6 #FF00FF #800000
Attributes
align
Value
Center , Left , Right
Description
Specifies the alignment of an text according to value.
Example
align = center
Value
Image path Any Text Top , bottom, middle , left , right pixels Pixels Pixels Any Text
Description
Specifies the URL of an image Specifies an alternate text for an image Specifies the alignment of an image according to surrounding elements Specifies the width of the border around an image Specifies the white space on left and right side of an image or Top & Bottom of image Specifies Height & Width of Image Display text as tool tip for image
Example
src = 1 . Jpg alt = Any Msg align = top Border = 5 hspace = 10 height= 10 Width= 5 Title = any Msg
Meaning of Hyperlink
hyperlink (or link) is a word, group of words, or image that you can click on to jump to a new document or a
A new section within the current document.
move the cursor over a link in a Web page, the arrow will turn into a little hand.
When you
Blue in color
The Hyperlink text / image is underlined. When the mouse cursor is placed over it, the standard arrow shaped mouse cursor changes to the shape
of a hand.
Alink
Vlink
Any Color
Any Color
Alink = Yellow
Vlink = Yellow
Type of links
Linking can be of Two Types
External Linking
Internal Linking
These are the links to files not on your own site or page
These are the links to parts of files in your own site or page
a > anchor tag is used to create link between different web pages. It can be of two types Internal & External Linking.
< a href = URL
Absolute URL
It will show the entire path of the file
Relative URL
It describe the location of the desired file with reference to the location of the file that contain URL itself.
http://abcd/mail/new.html
mail/new.html
External Linking
Attributes Value Description An absolute URL - points to another web site (like href="http://www.example.com/default.htm") A relative URL - points to a file within a web site (like href="default.htm") An anchor URL - points to an anchor within a page (like href="#top") Example href URL href= http://www.yahoo.co m/
target
Target = _blank
Internal Linking
Attributes name href Value Any name # anchor section Description Name of Anchor Section Linking with anchor section Example Name = BCA href = # anchor section
< a name = Location name > < a href = # location name > Click me </ a>
Example:
<<H1>Table
of Contents</H1> <A href="#section1">Introduction</A><BR> <A href="#section2">Some background</A><BR> <A href="#section2.1">On a more personal note</A><BR> ...the rest of the table of contents... ...the document body.. . <H2> <A name="section1">Introduction</A> </H2> ...section 1... <H2> <A name="section2">Some background</A> </H2> ...section 2... <H3> <A name="section2.1">On a more personal note</A> </H3> ...section 2.1..
OUTPUT
Table of Contents Introduction Some background On a more personal note ...the rest of the table of contents... ...the document body... I Introduction ...section 1... 1 Some background ...section 2... 1
>
Attributes align
Value
Description
caption tag for providing name of Table Table Row ( TR ) tag used to form a single row with in a table TD ) tag used to put data in a cell Table Heading ( TH ) used to put text as heading in a cell.
Single cell
Result : -
span across more than one column or row. The COLSPAN ("how many across") and ROWSPAN ("how
The colspan attribute of the TD element specifies the number of columns spanned by the cell, and the rowspan attribute specifies the number of rows spanned by the cell
Nested Tables
When User declare or uses a table inside another table as a its data member.
Nested Tables
<TABLE BORDER="7" CELLPADDING="10" CELLSPACING="10" BGCOLOR=blue"> <CAPTION ALIGN="BOTTOM">Butterfly</CAPTION> <TR> <TD> <TABLE BORDER="7" CELLPADDING="10" CELLSPACING="10" BGCOLOR=red> <TR> <TD><IMG SRC="bfly.gif" ALT="butterfly"></TD> </TR> </TABLE> </TD> </TR> </TABLE>
Miscellaneous TAGS
Pixels
hspace = 10
speed Pixels
Scrollamount=20 Width=10
< UL > for Unordered List it contain < Li > List item Tag init <OL > for Ordered List it contain <Li> List item init. <ul> <li>first list item</li> <li>second list item</li> <li>third list item</li> </ul>
<ol> <li>first list item</li> <li>second list item</li> <li>third list item</li> </ol>
Output 1. First list item 2. Second list item 3. Third list item
<UL>
Type
<ul> <li type="disc">first list item</li> <li type="circle">second list item</li> <li type="square">third list item</li> </ul>
Tag
Attributes
Value
Description
Example Start = 5
< li >
start
Any Value
</body>