Вы находитесь на странице: 1из 16

Basic Structure: <!-- ..... --> Specifies a comment.

Anything between these tags will be skipped by the brow ser. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 //EN"> This is the necessary first element of any HTML 3.2 compliant document. <HTML>.....< /HTML> Encloses the entire document. <HEAD>.....< /HEAD> Encloses the head of the document. The following optional tags are placed in side the head. <TITLE>.....< /TITLE> Indicates the title of the document that is used as the window caption. This is the second of the two required tags for any HTML 3.2 compliant document. <BASE href="http://some.network/file.html"> Specifies the base URL of the document. This is used when dereferencing relative URLs in the page. <BASE href="http://some.net/file.html" TARGET="..."> Also specifies the base target frame that all links will default to. See the LINK tag for possible values used in TARGET. <META attribut1 attribute2> This element can be used to specify name/value pairs describing various properties of the document. Below are some examples: To have your page automatically reloaded every X seconds, use the follow ing: <META HTTP-EQUIV="REFRESH" CONTENT=X > To have a different page automatically loaded after X seconds, use the f ollowing: <META HTTP-EQUIV="REFRESH" CONTENT="X; URL=http://some.address/file.html "> To specify an expiration date for the page so that it will be reloaded a fter a certain date, use: <META HTTP-EQUIV="Expires" CONTENT="Mon, 23 Sep 1996 01:21:00 GMT"> To specify keywords for certain search services to use, do the following : <META HTTP-EQUIV="Keywords" CONTENT="keyword1, keyword2, ..."> To specify a description of your page for certain search services to use , do the following: <META HTTP-EQUIV="Description" CONTENT="Describe your site here...."> <LINK attribute=" HREF="..." > Currently this tag is not widely supported, however in the future browse rs will use a list of these tags to generate a navigation bar for the site. With out browser support, this tag can still be useful for site maintenance. Attributes: REL="..."--Specifies the type of relationship of the link to this pa ge. Possible values are: "home", "toc" (table of contents), "index", "glossary", "copyright", "bookmark", "up", "next", "previous", and "help". REV="..."--Used instead of REL, this specifies a reverse relationshi p from this page to the link. Possible values are: "made" (author, set HREF=emai l address) and all the ones used in REL. HREF="..."--Specifies the address of the link. TITLE="..."--Specifies a title for the link.

<BODY attribute1="..." attribute2="...">.....< /BODY> Encloses the main body of the document. Attributes: ALINK="..."--Specifies the color of the activated links in the page. BACKGROUND="..."--Specifies an image to be tiled as background. BGCOLOR="..."--Specifies the background color. BGPROPERTIES=FIXED--Fixes the background image so that it doesn't scroll . (IE) LEFTMARGIN="n"--Specifies the left margin for the entire page. (IE) LINK="..."--Specifies the color of the links in the page. TEXT="..."--Specifies the color of the text in the page. TOPMARGIN="n"--Specifies the top margin for the entire page. (IE) VLINK="..."--Specifies the color of the followed links in the page. NOTE:Color is always expressed as RGB (Red Green Blue), where each color has a value between 0 and 255 expressed in hex notation. For example, BGCOLOR=# FFFF00 sets the background color to yellow. For more information check out Color s of the Web. <BASEFONT attribute="> Sets the default font properties for the entire page. Attributes: SIZE="..."--Sets the size of the font to any number between 1 and 7 with 3 being default. Relative sizes also work, e.g. SIZE=+2 . COLOR="..."--Specifies the default font color for the page. Name="..."--Specifies the typeface of the default font. <Hn>...< /Hn> Makes the enclosed text a heading of various sizes where n is any number ran ging from 1 to 6, and 1 creates the biggest heading while 6 creates the smallest . <ISINDEX> Displays a text box indicating the presence of a searchable index. Simply ad ding this tag will not create a searchable page. The server must be set up to su pport it. Attributes: ACTION="..."--Specifies the location of the gateway program to which the search string should be passed. PROMPT="..."--Specifies an alternate prompt for the text box. TOP | BASIC STRUCTURE | MULTIMEDIA | LINKS | LISTS | FRAMES | TABLES | FORMS | S TYLE | GENERAL FORMATTING | BOTTOM Multimedia: <IMG attribute1 attribute2> Places an inline image into the document. Attributes: SRC="..."--Specifies the URL of the image. DYNSRC="..."--Specifies the URL of a video clip or VRML world. An image can also be specified first using SRC= to cover for browsers that do not support videos. (IE) CONTROLS--Adds a set of controls under the video clip. (IE) LOOP="n"--For video clips, specifies the number of times to loop the cli p. A value of "-1" or "INFINITE" makes it loop indefinitely. (IE) START="..."--Specifies when the video clip should start playing. Possibl e values are "FILEOPEN" (default), "MOUSEOVER", or both.(IE) USEMAP="#map1" --Tells the browser that the image is a client-side click able image map defined under the name "map1". ISMAP --Tells the browser that the image is a server-side clickable imag

e map. ALT="..."--Specifies a text string to be displayed on browsers that do n ot support inline images. BORDER="..."--Specifies the width of the border drawn around the image. If BORDER is set to "0", there will be no border even around pictures that are l inks. LOWSRC="..."--Specifies the URL of an image to be loaded first, before t he image specified in SRC is loaded. LOWSRC usually reefers to a smaller image. ALIGN="..."--Specifies the alignment of the image. Values: RIGHT or LEFT--Aligns the image to the specified side of the page, a nd all text is wrapped around the image. TOP, MIDDLE, BOTTOM, TEXTTOP, ABSMIDDLE, BASELINE, and ABSBOTTOM--Sp ecifies the vertical alignment of the image with other items on the same line. VSPACE="..."--Specifies the space left between the edge of the image and the items above or below it. HSPACE="..."--Specifies the space left between the edge of the image and the items to the left or right of it. WIDTH="..."--Specifies the width of the image. If the width is not the a ctual width, the image is scaled to fit. HEIGHT="..."--Same as above ,except it specifies the height of the image . <MAP attribute>...< /MAP> Specifies a collection of hot spots that define a client-side image map. The AREA tag can be used inside to define the hot spots. Attributes: NAME="..."--Specifies the name of the map so that it can be referred to later. <AREA attribute1 attribute2>...< /AREA> Specifies the shape and size of a hot spot to be used in the definition of a client-side image map. Used inside the MAP tag. Attributes: SHAPE="..."--Specifies the shape of the hot spot. Possible values are RE CT, RECTANGLE, CIRC, CIRCLE, POLY, or POLYGON. COORDS="..."--Specifies the coordinates that define the hot spot's posit ion. Two pairs of coordinates are needed for RECT, three or more pairs for POLY, and one pair of coordinates and a radius for CIRC. HREF="..."--Specifies the URL that this hot spot points to. NOHREF--Indicates that this hot spot points to nothing. TARGET="..."--Specifies which window the link will be loaded into. The t arget can be a name of a frame that you specified in the FRAME tag or one of the following: Values: "_blank"--Loads the link into a new blank window. "_parent"--Loads the link into the immediate parent of the document the link is in. "_self"--Loads the link into the same window. (default) "_top"--Loads the link into the full body of the current window. <BGSOUND attribute1 attribute2> (IE) Specifies a background sound to be played whenever the page is loaded. This "soundtrack" can be either a sample (.wav or .au) or midi (.mid) file. Attributes: SRC="..."--Specifies the URL of the sound to be played. LOOP="n"--Specifies the number of times the sound will loop. Values of " -1" or "INFINITE" make the sound loop indefinitely. <MARQUEE attribute1 attribute2>...< /MARQUEE> (IE)

Places a scrolling text marquee into the document. Attributes: ALIGN="..."-- Possible values of "TOP", "MIDDLE", or "BOTTOM". Specifies the alignment of the text around the marquee with respect to the marquee. BEHAVIOR="..."--Possible values of "SCROLL" (default), "SLIDE", or "ALTE RNATE". Specifies the behavior of the marquee text. "SCROLL" is the default, "SL IDE" makes the text start from off the screen and then stick, "ALTERNATE" makes the text alternate back and forth repeatedly. BGCOLOR="..."--Specifies the background color of the marquee. DIRECTION="..."--Possible values are "LEFT" (default) or "RIGHT". Specif ies the direction for the text to scroll. HEIGHT="..."--Specifies the height of the marquee in number of pixels or % of screen. HSPACE="n"--Specifies the left and right margins of the outside of the m arquee in pixels. LOOP="n"--Specifies the number of times the marquee will loop. Values of "-1" or "INFINITE" make the marquee loop indefinitely. SCROLLAMOUNT="n"--Specifies the number of pixels between each successive draw of the marquee text. SCROLLDELAY="n"--Specifies the number of milliseconds between each succe ssive draw of the marquee text. VSPACE="n"--Specifies the top and bottom margin for the outside of the m arquee. WIDTH="..."--Specifies the width of the marquee either in pixel or in a percentage of the screen. <APPLET attribute1 attribute2> parameter1 parameter2 ... < /APPLET> Inserts a Java applet in the HTML document. Any text placed between the open ing and closing APPLET tags will be displayed by browsers that do not support JA VA. Attributes: ALIGN="..."-- Possible values of "LEFT", "RIGHT", "TOP", "MIDDLE", or "B OTTOM". Specifies the alignment of the text around the object with respect to th e object. ALT="..."--Specifies the text to be displayed by browsers that recognize the tag but cannot show applets. CODE="..."--Specifies the name of the Java applet. CODEBASE="..."--Specifies the base address of the applet. The directory in which the applet is located. DOWNLOAD=n--Specifies an order in which images are downloaded. HIGHT="..."--Specifies the height of the applet in number of pixels or % of screen. HSPACE="n"--Specifies the left and right margins of the outside of the a pplet in pixels. NAME="..."--Specifies the name of the applet instance, in case there are more than one of the same applet on the page. VSPACE="n"--Specifies the top and bottom margin for the outside of the a pplet. WIDTH="..."--Specifies the width of the applet either in pixel or in a p ercentage of the screen. Parameters: These are the applet-specific parameters that are passed as argument s to the program. They are specified as tags within the APPLET tag as follows: < PARAM NAME="..." VALUE="..." > <EMBED attribute1 attribute2>< /EMBED> Inserts an embedded multimedia object, such as a sound file or video, into t he page. In the future, when the OBJECT tag becomes finalized and well supported , this tag will be obsolete. Attributes:

AUTOSTART="..."--Specifies whether the file starts playing right away or not. Possible values are "TRUE" or "FALSE". HIGHT="..."--Specifies the height of the display in number of pixels or % of screen. LOOP="..."--Specifies whether the file repeats or not. Possible values a re "TRUE" or "FALSE". NAME="..."--Specifies the name of the object, in case there are other ob jects that refer to this one. SRC="..."--Specifies the location of the object file. WIDTH="..."--Specifies the width of the display either in pixel or in a percentage of the screen. <SCRIPT attribute> ...script statements... < /SCRIPT> Encloses scripting language statements to be executed by the browser. To ens ure backward compatibility, enclose the script statements in comment tags (<!-... -->) Attributes: LANGUAGE="..."--Specifies which language is being used in the script suc h as "VBScript" or "JavaScript". SRC="..."--Specifies the location of a file containing the script. This can be used if you don't want the code to be on the same HTML file. <NOSCRIPT> ... < /NOSCRIPT> Encloses anything you want displayed by browsers that do not support inline scripts. These go inside the SCRIPT tags. TOP | BASIC STRUCTURE | MULTIMEDIA | LINKS | LISTS | FRAMES | TABLES | FORMS | S TYLE | GENERAL FORMATTING | BOTTOM Links: <A attribute="...">...< /A> When used with the HREF attribute, the enclosed text and/or graphic becomes a link to another document or anchor. When used with the NAME attribute, the enc losed text and/or graphic becomes an anchor. Attributes: HREF="..."--Specifies the URL of the document to be linked to. NAME="..."--Specifies the name of the anchor you are creating. onClick="--Specifies a script to be activated when the mouse is clicked. onMouseOver="--Specifies a script to be activated when the mouse is move d over the link. REL="..."--Specifies a relative relationship. REV="..."--Specifies the reverse relationship. TARGET="..."--Specifies which window the link will be loaded into. The t arget can be a name of a frame that you specified in the FRAME tag or one of the following: Values: "_blank"--Loads the link into a new blank window. "_parent"--Loads the link into the immediate parent of the document the link is in. "_self"--Loads the link into the same window. (default) "_top"--Loads the link into the full body of the current window. TITLE="..."--Specifies the title that appears when the link is selected, but not yet clicked. TOP | BASIC STRUCTURE | MULTIMEDIA | LINKS | LISTS | FRAMES | TABLES | FORMS | S TYLE | GENERAL FORMATTING | BOTTOM Lists: <LI attribute> Used to mark text as a list item in any of the following list types: <DIR>,

<MENU>, <OL>, or <UL>. Attributes: TYPE="..."--Specifies the type of bullet used to label the item. Possibl e values are: DISC, CIRCLE, SQUARE, A, a, I, i, 1. VALUE="..."--Specifies the number assigned to the item. <DIR>...< /DIR> Puts the enclosed items marked with <LI>, in a directory listing. <MENU>...< /MENU> Puts the enclosed items marked with <LI>, in a menu list. <OL attribute>...< /OL> Puts the enclosed items marked with <LI>, in a numbered list. Attributes: TYPE="..."--Specifies the type of numbering used to label the item. Poss ible values are: A, a, I, i, 1. START="..."--Specifies the starting value for the numbering. <UL attribute>...< /UL> Puts the enclosed items marked with <LI>, in a bulleted list. Attributes: TYPE="..."--Specifies the type of bullet used to label the item. Possibl e values are: DISC, CIRCLE, SQUARE. <DL>...< /DL> Creates a definition list. Within this container, <DT> specifies a definitio n term and <DD> specifies the definition. TOP | BASIC STRUCTURE | MULTIMEDIA | LINKS | LISTS | FRAMES | TABLES | FORMS | S TYLE | GENERAL FORMATTING | BOTTOM Frames: <FRAMESET attribute1="..." attribute2="...">...< /FRAMESET> Defines a set of frames that will make up the page. The FRAME, and NOFRAMES tags go inside this. The FRAMESET tag is used instead of the BODY tag. You can, however, include a BODY tag inside the NOFRAMES tags for browsers that do not su pport frames. Attributes: BORDER="..."--Specifies the width (in pixels) of the border drawn around the frames.(Netscape) COLS="..."--Creates the frames as columns and specifies the width of eac h column. Width of the columns can be set using percentages (%), pixels, or rela tive size (*). For example, if you want your frames to be 3 equally sized column s, you would use: COLS=33%,33%,* FRAMEBORDER="..."--Specifies whether or not a 3-D border is displayed ar ound the frames. possible values are 0 (no border) or 1 (default).(IE) FRAMESPACING="..."--Specifies in pixels, the amount of space between the frames. ROWS="..."--Creates the frames as rows and specifies the width of each r ow. width of the rows can be set using percentages (%), pixels, or relative size (*). For example, if you want a small frame at the top of your page and one lar ge frame below that, you might use: ROWS=15%,* SCROLLING="..."--Determines whether or not scroll bars are displayed on all the frames. Possible values are "yes", "no", and "auto". <FRAME attribute1="..." attribute2="..."> Defines a single frame within a frameset. Attributes: BORDER="..."--Specifies the width (in pixels) of the border drawn around

the frame.(Netscape) FRAMEBORDER="..."--Specifies whether or not a 3-D border is displayed ar ound the frame. possible values are 0 (no border) or 1 (default).(IE) MARGINHEIGHT="..."--Specifies the top and bottom margins of the frame in pixels. MARGINWIDTH="..."--Specifies the right and left margins of the frame in pixels. NAME="..."--Defines a target name for the frame. NORESIZE--Prevents the frame from being resized by the user SCROLLING="..."--Determines whether or not scroll bars are displayed alo ng the frame. Possible values are "yes", "no", and "auto". SRC="..."--Specifies the source file for the frame. <IFRAME attribute1="..." attribute2="...">< /IFRAME> (IE) Defines a floating frame. Does not need to be placed within a FRAMESET. Attributes: ALIGN="..."--Specifies the alignment of the floating frame and surroundi ng text. Possible values are TOP, MIDDLE, BOTTOM, LEFT, and RIGHT. FRAMEBORDER="..."--Specifies whether or not a 3-D border is displayed ar ound the frame. possible values are 0 (no border) or 1 (default) HEIGHT="..."--Specifies the height of the floating frame. MARGINHEIGHT="..."--Specifies the top and bottom margins of the floating frame in pixels. MARGINWIDTH="..."--Specifies the right and left margins of the floating frame in pixels. NAME="..."--Defines a target name for the floating frame. NORESIZE--Prevents the frame from being resized by the user SCROLLING="..."--Determines whether or not scroll bars are displayed alo ng the frame. Possible values are "yes" and "no". SRC="..."--Specifies the source file for the floating frame. WIDTH="..."--Specifies the width of the floating frame. <NOFRAMES>...< /NOFRAMES> Placed inside the FRAMESET, anything between the beginning and ending of thi s tag is viewable only by browsers that do not support frames. This tag is used to create pages that are compatible with older browsers that do not support fram es. TOP | BASIC STRUCTURE | MULTIMEDIA | LINKS | LISTS | FRAMES | TABLES | FORMS | S TYLE | GENERAL FORMATTING | BOTTOM Tables: <TABLE attribute1="..." attribute2="...">...< /TABLE> Creates a table that can include any number of rows. Attributes: BORDER="..."--Specifies the width of the border around the table. If set to 0, there will be no border. BACKGROUND="..."--Specifies the address of an image to be tiled as backg round.(IE) BGCOLOR="..."--Specifies the background color of the table. BORDERCOLOR="..."--Specifies the border color of the table. BORDERCOLORLIGHT="..."--Specifies the lighter color used in creating the 3D borders independently.(IE) BORDERCOLORDARK="..."--Specifies the darker color used in creating the 3 D borders independently.(IE) WIDTH="..."--Specifies the width of the table on the page. CELLSPACING="..."--Specifies the amount of space between the cells in th e table. CELLPADDING="..."--Specifies the amount of space between the edges of th e cell and the text inside.

FRAME="..."--Specifies which sides of the outer border of the table are displayed.(IE) Possible types: VOID--No outside borders are displayed. ABOVE--Displays a border on the top side of the table. BELOW--Displays a border on the bottom side of the table. HSIDES--Displays the top and bottom borders of the table. LHS--Displays the left-hand side border. RHS--Displays the right-hand side border. VSIDES--Displays the right and left side borders. BOX--Displays a border on all sides of the table. BORDER--Displays a border on all sides of the table. HEIGHT="..."--Specifies the height of the table on the page. RULES="..."--Specifies which inner borders of the table are displayed.(I E) Possible types: NONE--No inside borders are displayed. GROUPS--Displays inner borders between the various table groups such as THEAD, TFOOT, TBODY, and COLGROUP groups. ROWS--Displays inner borders between the table rows. COLS--Displays inner borders between the table columns. ALL--Displays inner borders between all rows and columns. <CAPTION attribute1="...">...< /CAPTION> Specifies the caption of the table. Attributes: ALIGN="..."--Specifies the position of the caption. Possible values are LEFT, RIGHT, BOTTOM, or TOP. <TR attribute1="..." attribute2="...">...< /TR> Specifies a table row. It can enclose the table heading and table data. Attributes: ALIGN="..."--Specifies the horizontal alignment of the row contents. Pos sible values are LEFT, RIGHT, and CENTER. BGCOLOR="..."--Specifies the background color for the row. BORDERCOLOR="..."--Specifies the border color of the row. BORDERCOLORLIGHT="..."--Specifies the lighter color used in creating the 3D borders independently.(IE) BORDERCOLORDARK="..."--Specifies the darker color used in creating the 3 D borders independently.(IE) VALIGN="..."--Specifies the vertical alignment of the row contents. Poss ible values are TOP, MIDDLE, BOTTOM, and BASELINE. HEIGHT="..."--Specifies the height of the cell. <TH attribute1="..." attribute2="...">...< /TH> Makes the cell a table heading. Attributes: ALIGN="..."--Specifies the horizontal alignment of the cell contents. Po ssible values are LEFT, RIGHT, and CENTER. NOWRAP--Prevents word wrapping within the cell BGCOLOR="..."--Specifies the background color for the cell. BACKGROUND="..."--Specifies the address of an image to be tiled as backg round.(IE) BORDERCOLOR="..."--Specifies the border color of the cell. BORDERCOLORLIGHT="..."--Specifies the lighter color used in creating the 3D borders independently.(IE) BORDERCOLORDARK="..."--Specifies the darker color used in creating the 3 D borders independently.(IE) VALIGN="..."--Specifies the vertical alignment of the cell contents. Pos

sible values are TOP, MIDDLE, BOTTOM, and BASELINE. ROWSPAN="..."--Specifies the number of rows the cell will span. COLSPAN="..."--Specifies the number of columns the cell will span. WIDTH="..."--Specifies the width of the cell. HEIGHT="..."--Specifies the height of the cell. <TD attribute1="..." attribute2="..."> These go inside the TR tags and they define the data in a cell. End tag may be used. Attributes: BACKGROUND="..."--Specifies the address of an image to be tiled as backg round. (IE) BGCOLOR="..."--Specifies the background color for the individual cell. BORDERCOLOR="..."--Specifies the border color of the cell. BORDERCOLORLIGHT="..."--Specifies the lighter color used in creating the 3D borders independently.(IE) BORDERCOLORDARK="..."--Specifies the darker color used in creating the 3 D borders independently.(IE) ALIGN="..."--Specifies the horizontal alignment of the cell contents. Po ssible values are LEFT, RIGHT, and CENTER. NOWRAP--Prevents word wrapping within the cell VALIGN="..."--Specifies the vertical alignment of the cell contents. Pos sible values are TOP, MIDDLE, BOTTOM, and BASELINE. ROWSPAN="..."--Specifies the number of rows the cell will span. COLSPAN="..."--Specifies the number of columns the cell will span. WIDTH="..."--Specifies the width of the cell. HEIGHT="..."--Specifies the height of the cell. <COLGROUP attribute1="..." attribute2="...">(IE) Specifies the properties of one or more columns. This tag generally goes rig ht after the opening TABLE tag. Attributes: ALIGN="..."--Specifies the position of the text within the cells of the Columns. Possible values are CENTER, LEFT, RIGHT, BOTTOM, or TOP. SPAN="..."--Specifies the number of columns for which these attributes w ill apply. <COL attribute1="..." attribute2="...">(IE) Used with the COLGROUP tag, this specifies the properties of one column. Thi s tag overrides any attributes specified in the COLGROUP tag that comes right be fore it. Attributes: ALIGN="..."--Specifies the position of the text within the cells of the Column. Possible values are CENTER, LEFT, RIGHT, BOTTOM, or TOP. SPAN="..."--Specifies the number of columns for which these attributes w ill apply. <TBODY>...< /TBODY>(IE) Encloses the body of your table. This tag is optional unless you are using t he THEAD or TFOOT tags. It used to separate the rows in the table from those in the header or footer. <TFOOT>...< /TFOOT>(IE) Encloses the table rows that are to be used as a footer. It is an optional t ag and comes right after the ending TBODY element. <THEAD>...< /THEAD>(IE) Encloses the table rows that are to be used as a header. It is an optional t ag and comes before the opening TBODY element. TOP | BASIC STRUCTURE | MULTIMEDIA | LINKS | LISTS | FRAMES | TABLES | FORMS | S TYLE | GENERAL FORMATTING | BOTTOM Forms:

<FORM attribute1="..." attribute2="...">.....< /FORM> Specifies a form. Forms can be used to send user input to the server in the form of NAME/VALUE pairs. Attributes: ACTION="..."--Specifies the address to be used in carrying out the actio n of the form. Usually the address of the CGI file. You can also specify a mailt o address to have the contents of the form emailed to you instead of getting pas sed to the server. (in future browsers) METHOD="..."--Specifies the method used by the server in sending the for m information. Possible values are POST or GET. When GET is used, the server sim ply appends the arguments to the end of the action address. With POST, the infor mation is sent as an HTTP post transaction. TARGET="..."--Specifies which window the result of the form will be load ed into. The target can be a name of a frame that you specified in the FRAME tag or one of the following: Values: "_blank"--Loads the result into a new blank window. "_parent"--Loads the result into the immediate parent of the documen t the form is in. "_self"--Loads the result into the same window. (default) "_top"--Loads the result into the full body of the current window. ENCTYPE="..."--For future browser. Specifies the type of encoding to use on the form information. <INPUT attribute1="..." attribute2="..."> Specifies a control or input area for a form, from which a NAME/VALUE pair w ill be returned to the server. Attributes: ALIGN="..."--If the TYPE is IMAGE, then this specifies the alignment of the surrounding text with the image. Possible values are TOP, MIDDLE, BOTTOM, LE FT, or RIGHT. CHECKED--Use this attribute in a RADIO or CHECKBOX type, and it will be pre-selected when the form loads. MAXLENGTH="..."--Specifies the maximum number of characters that can be entered in a text input. NAME="..."--Specifies the name of the control or input area. (Part of th e NAME/VALUE pair) SIZE="..."--Specifies the size of the text entry area that is displayed by the browser. SRC="..."--If the TYPE is IMAGE, then this specifies the address of the image to be used. VALUE="..."--Specifies the value to be submitted along with the correspo nding name(Part of the NAME/VALUE pair). Specifies the default text string for T EXT. For RESET and SUBMIT, this specifies the text string to be displayed on the 3-D button. TYPE="..."--Specifies the type of control being used. Possible types: CHECKBOX--Creates a checkbox. If the user checks it, the correspondi ng name/value pair is sent to the server. HIDDEN--Nothing is displayed by the browser, but the information is still sent to the server. IMAGE--Like the SUBMIT type, you can have the form sent immediately when the user clicks on an image. Along with the normal information, when a from is submitted by clicking on an image, the coordinates of the clicked point (mea sured in pixels from the upper-left corner of the image) are also sent. The x-co ordinate is submitted with a ".x" appended to the name and the y-coordinate has a ".y" appended to the name. PASSWORD--Creates a single line entry text box just like the TEXT ty pe, however, user input is not echoed on the screen.

RADIO--Creates a radio list of alternatives of which only one can be selected. Each alternative must have the same name, but different values can be assigned to each. RESET--Creates a 3-D button that clears the entire form to original values when clicked. You can give the button a name by using the VALUE attribute . SUBMIT--Creates a 3-D button that submits the form when clicked. You can give the button a name by using the VALUE attribute. TEXT--Creates a single line text entry box. You can specify the size of the text box by using the SIZE attribute. <SELECT attribute1="..." attribute2="...">< /SELECT> Creates a drop-down list of items. The list items are defined by the OPTION tags placed inside the opening and closing SELECT tag. Attributes: MULTIPLE--Specifies that multiple items may be selected. NAME="..."--Specifies the name of the list(Part of the NAME/VALUE pair). SIZE="..."--Specifies how many items should be visible. <OPTION value="...">item Specifies an item in the drop down list. Placed within the opening and c losing SELECT tags. Any text following the OPTION tag is what the user will see in the list. VALUE="..."--Specifies the value to be returned (Part of the NAME/VA LUE pair). SELECTED--This item will already be highlighted when the page loads. <TEXTAREA attribute1="..." attribute2="...">...< /TEXTAREA> Creates a multi-lined text entry box. Any text placed in between the tags is used as the default text string that is displayed when the page is loaded. Attributes: COLS="..."--Specifies how wide the text box will be. ROWS="..."--Specifies how high the text box will be. NAME="..."--Specifies the name of the text box for use by the program th at is processing the form. WRAP="..."--Specifies how text will wrap. Possible values are "HARD", "S OFT", or "NONE". TOP | BASIC STRUCTURE | MULTIMEDIA | LINKS | LISTS | FRAMES | TABLES | FORMS | S TYLE | GENERAL FORMATTING | BOTTOM Style Sheets: Style Sheets are a new way to easily and effectively customize web pages in ways that were not possible before. You will be able to specify margins, indents , font faces, and other features to gain control over the exact presentation of your document. Style Sheet, as designed by the World Wide Web Consortium, are new to HTML a nd so far only supported be Microsoft's Internet Explorer 3.0. However, Netscape and other browsers will definitely support these new elements in future release s so it is a good idea to get started on using Style Sheets now. There t, Adding all three ent style are three ways to add style to your documents: Linking to a style shee a style block, or using inline style attributes. In fact, you can use if you like. If there is a conflict, the browser will use the most rec definitions for that occurrence.

Linking to a Style Sheet You can create a separate text file with a .css file extension and place all

your style definitions (explained below) in that file. Then, using the LINK tag , you can link the style definitions to your current document. Using this method, you can have one style sheet for the entire site that is linked to each page. That way you can alter the look of all your documents be si mply editing the .css file. See syntax below. Inside the HEAD tag, add something like this: <LINK REL=STYLESHEET HREF="URL of style sheet" TYPE="text/css" > Your Style Sheet might contain something like this: H1 {font-size: 20pt; font-weight: bold} H2 {font-size: 16pt; font-weight: bold} P {margin-left: -20px; margin-right: -20px; margin-top: 30px} BODY {background: URL(http://my.server.com/pictures/back.gif); text-indent: 2cm} Adding a Style Block To set the style for an entire page, you can place all the style definitions (explained below) inside the <STYLE>.....< /STYLE> tag. This tag goes inside th e HEAD of your document. Make sure to enclose the definitions within comment tag s so that older browsers do not display them. See example below. <HEAD> . . <STYLE TYPE="text/css" > <!-BODY {font-family: Arial; font-size: 12pt; font-style: italic} P {margin-left: 30px; margin-right: 30px; margin-top: 10px} --> < /STYLE> < /HEAD> Inline Style Attributes If you simply want to change the style of a particular section of your docum ent, you can do so with the STYLE attribute. You can place this new attribute in side just about any HTML tag, and the style definitions will be in effect until the closing of that tag. Below are some examples. To change the color and indent of a certain paragraph, you could do the foll owing: <P STYLE="margin-left: 1in; margin-right: 1in; color: #0000FF"> This text would be indented and blue. < /P> To change the style for an entire portion of your document, you might do the following: <DIV STYLE="margin-left: 0.5in; margin-right: 0.5in; font-family: Arial"> This whole division of the page will be indented and any text will be displa yed in the Arial font. < /DIV> Style Definitions All three methods of adding style to a document use the same syntax for styl e definitions. Except for inline attributes, a style definition consists of a ta g followed by a list of specifications enclosed in curly braces. You can define styles for any tag in HTML. Once you have specified styles for a certain tag, ev ery time the tag is used, the styling will be in effect. Below is a list of all the style definitions and their possible values.

background -- Specifies a background color or image. Values: URL|RGB triplet Example: BODY {background: #FFFFFF} color -- Specifies the color of the text. Values: RGB triplet Example: H4 {color: #000000} font-family -- Specifies the typeface. Values: typeface name or list of names Example: P {font-family: Arial, Helvetica, "Courier New"} font-size -- Specifies the size of the text. Values: pt (points)|in (inches)|cm (centimeters)|px (pixels)|% (per centage) Example: A:visited {font-size: 14pt} font-style -- Specifies the style of the text. Values: italic|normal|oblique|small caps Example: H3 {font-style: italic} font-weight -- Specifies the thickness of the text. Values: extra-light|light|demi-light|medium|demi-bold|extra-bold Example: H2 {font-weight: bold} line-height -- Specifies the distance between lines. Values: pt (points)|in (inches)|cm (centimeters)|px (pixels)|% (per centage) Example: DIV {line-height: 20pt} margin-left -- Specifies the left margin. Values: pt (points)|in (inches)|cm (centimeters)|px (pixels) Example: BODY {margin-left: 3cm} margin-right -- Specifies the right margin. Values: pt (points)|in (inches)|cm (centimeters)|px (pixels) Example: BODY {margin-right: -0.5in} margin-top -- Specifies the top margin. Values: pt (points)|in (inches)|cm (centimeters)|px (pixels) Example: BODY {margin-top: 20px} text-align -- Specifies the justification of the text. Values: left|center|right Example: H1 {text-align: center} text-decoration -- Specifies certain text effects. Values: none|italic|underline|line-through|overline|blink Example: A:link {text-decoration: none} text-indent -- Specifies the text indentation. Values: pt (points)|in (inches)|cm (centimeters)|px (pixels) Example: P {text-indent: 0.5in} Additional Options Grouping Certain style definitions can be grouped together in one statement. Inst ead of using three statements to specify all three margins, you could use the fo llowing: P {margin: 20px 3cm 3cm} The order is top, right, and left. You can also group all the font statements together like this: A:active {font: bold italic 15pt/22pt Arial, serif} The weight and style must be specified first, and the first number repre sents the size, while the second number represents the line height. Classes You can also define more than one instance of a tag. For example, say yo u wanted two H1 headings; one that was red and one that was blue. You could defi ne the two tags like this: H1.redh {color: #FF0000; font-size: 20pt} H1.blueh{color: #0000FF; font-size:20pt}

Later you could use them like this: <H1 CLASS=redh>This will be red< /H1> <H1 CLASS=blueh>This will be blue< /H1> TOP | BASIC STRUCTURE | MULTIMEDIA | LINKS | LISTS | FRAMES | TABLES | FORMS | S TYLE | GENERAL FORMATTING | BOTTOM General Formatting: <ADDRESS>.....< /ADDRESS> Encloses the signature file of the author of the page. Text is displayed in italics. <B>...< /B> Boldfaces the enclosed text. <BIG>...< /BIG> Makes the enclosed text one size larger. <BLINK>.....< /BLINK> Makes the enclosed text blink continually. <BLOCKQUOTE>.....< /BLOCKQUOTE> Encloses a long quote. Both the left and right margins are indented. <BR> Inserts a line break. Attributes: CLEAR="..."--Causes the text to stop flowing around any images. Possible values are RIGHT, LEFT, or ALL. <CENTER>.....< /CENTER> Centers the enclosed elements. This tag will center everything including ima ges, text, tables, forms, etc. <CITE>.....< /CITE> Encloses a citation such as the title of a book or paper. <CODE>.....< /CODE> Encloses a sample of code. The text is rendered in small font. <COMMENT>.....< /COMMENT> Encloses a comment. Text inside the tags is ignored unless it contains HTML code. <DFN>.....< /DFN> Encloses a definition. Text inside the tags is formatted to look like a defi nition. <DIV ALIGN=">...< /DIV> Specifies the alignment of the enclosed elements. Can be used to divide a do cument into sections that are aligned differently. In future browsers, more attr ibutes will probably be supported. Attributes: ALIGN="..."--Sets the alignment of the division. Possible values are "ce nter", "right", or "left". <EM>...< /EM> Emphasis on the enclosed text (Italics). <FONT attribute=">...< /FONT>

Sets the font properties for the enclosed text. Attributes: SIZE="..."--Sets the size of the font to any number between 1 and 7 with 3 being default. relative sizes also work, e.g. SIZE=+2 . COLOR="..."--Specifies the color of the font. FACE="..."--Specifies the face of the font. A list can be defined (separ ated by commas) and the browser will use the first one available on that compute r. <HR attribute1="..." attribute2="..."> Inserts a horizontal line. Attributes: SIZE="..."--Specifies the thickness of the line. COLOR="..."--Specifies the color of the line.(IE) WIDTH="..."--Specifies the length of the line as a percentage of the scr een. e.g. WIDTH=90% . ALIGN="..."--Specifies the alignment of the line: RIGHT, LEFT, or CENTER . NOSHADE--The line is drawn solid. <I>...< /I> The enclosed text is italics. <KBD>...< /KBD> Specifies text to be entered at the keyboard. Text is rendered as bold and f ixed-width. <LISTING>.....< /LISTING> Displays text in fixed-width type. Obsolete -- use the PRE tag instead. <MULTICOL>.....< /MULTICOL> Displays text in columns. Attributes: COLS="..."--Specifies the number of columns to use. GUTTER="..."--Specifies the number of pixels between each column. WIDTH="..."-- Specifies the width of the columns as a whole. <NOBR>.....< /NOBR> Causes the enclosed text to not wrap to fit the screen. <P attribute>...< /P> Designates the enclosed text as a plain paragraph. The end tag is optional. Attributes: ALIGN="..."--Specifies the alignment for the paragraph. Possible values are "center", "left", or "right". <PLAINTEXT>.....< /PLAINTEXT> Displays text in fixed-width type without processing most HTML tags. Obsolet e -- use the PRE tag instead. <PRE>.....< /PRE> Displays text in fixed-width type without collapsing spaces. <S>.....< /S> Displays text with a line through it. The <STRIKE> tag does exactly the same . <SAMP>...< /SAMP> Indicates sample output from a form or program. Text is rendered in small fo nt.

<SMALL>...< /SMALL> Makes the enclosed text one size smaller. <SPACER attribute>...< /SPACER>(Netscape) Inserts blocks of spaces into HTML documents. Attributes: ALIGN="..."--When TYPE=BLOCK, this specifies the alignment of the surrou nding text. Values: RIGHT or LEFT--Aligns the block of space to the specified side of th e page, and all text is wrapped around the block. TOP, MIDDLE, BOTTOM, TEXTTOP, ABSMIDDLE, BASELINE, and ABSBOTTOM--Sp ecifies the vertical alignment of the block of space with other items on the sam e line. HEIGHT="..."--When TYPE=BLOCK, this specifies the height of the block. SIZE="..."--When TYPE=HORIZONTAL, or VERTICAL, this specifies the size o f the space. TYPE="..."--Specifies the type of space being inserted. Values: HORIZONTAL--Inserts blank spaces between words. VERTICAL--Inserts spaces between two lines. BLOCK--Inserts a rectangular block of space, much like the IMG tag. WIDTH="..."--When TYPE=BLOCK, this specifies the width of the block. <STRONG>...< /STRONG> Stronger emphasis on the enclosed text (bold). <SUB>...< /SUB> Renders the enclosed text in subscript. <SUP>...< /SUP> Renders the enclosed text in superscript. <TT>...< /TT> The enclosed text is typewriter font. <U>...< /U> The enclosed text in underlined. Try to avoid this since underlined text usu ally indicates a link. <VAR>...< /VAR> Specifies a variable. Text is rendered in small fixed-width type. <WBR> Causes text enclosed by the NOBR tags to wrap only if necessary. <XMP>...< /XMP> Causes enclosed text to be displayed by the browser without processing most HTML tags. Obsolete -- use the PRE tag instead.

Вам также может понравиться