Coolnerds Electronic HTML Reference
Note: The links below won't work until the entire document has been
downloaded. And that may take up to a minute, depending on the speed of
your modem.
About
Home
<!>
These tags enclose comments to yourself, which can help you document your HTML code and make it more maintainable. The browser ignores the open and close tags and any text between . Identical in function to the ... tags.
Example
Top
...
An anchor element marks either the start of a hypertext link or the destination of a hypertext link. Use this tag to create hot spots on your Web page or to jump to hot spots on the Web, in another file, or on the same page. Either the HREF or the NAME attribute is required to use the anchor element.
Attributes
HREF="target" text_or_image Defines a hyperlink. The browser jumps to the target when the user clicks the hyperlink text_or_image. The target can be a URL, a filename, or a #identifier that refers to an anchor (bookmark) in the same or another document.
NAME="identifier" Defines a bookmark - the target of a hyperlink. The identifier must be unique within the HTML document.
TITLE="title" An informational title for the document referenced by the HREF attribute. In most browsers this title appears in the status bar when the user is pointing to the hyperlink in the document.
REL="relationship_values_list" Specifies the relationship(s) from the anchor to the target. Relationship_values_list is a comma-separated list. Used only with the HREF attribute.
REV="relationship_values_list" Same as REL, except that it specifies the relationship(s) from the target to the anchor
URN="uniform_resource_name" Specifies a uniform resource name for a target document. Not widely supported at this time.
METHODS="methods_list" Specifies functions a user can perform on an object. Methods_list is a comma-separated list. Acceptable methods are determined by the server.
TARGET="window_name" Used with the HREF attribute to specify the name of a frame, or a new browser window that opens if it isn't opened already. In framed sites, this attribute takes precedence of the tag.
Example
Here's a small web page that contains a bookmark, a hyperlink to that bookmark, and a hyperlink to a site on the web.
This is the title
Body text body text body text body text body text. Body text body text body text body text body text. Body text body text body text body text body text. Body text body text body text body text body text. Body text body text body text body text body text.
Go to TopGo to My Home Page
Netscape Gold Editor
There are a couple ways that you can use Netscape Gold Editor with anchor elements:
To create a hyperlink (), select the text or image that should become the hot spot and click the Make A Link toolbar button, or choose Insert > Link. To change the hyperlink properties, click the link and then click the Object Properties toolbar button.
To create a target (), position the insertion point where the target should appear and click the Insert Target (Named Anchor) toolbar button, or choose Insert > Target (Named Anchor). To change the target properties, double-click the target.
Word IA
Word IA also offers a few different methods for working with anchor elements:
To create a hyperlink, select the text or image that should become the hot spot and click the Hyperlink toolbar button, or choose Insert > Hyperlink.
To create a target (bookmark), position the insertion point where the bookmark should appear and click the Bookmark toolbar button or choose Edit > Bookmark.
Top
...
These tags format the text that appears between the open and close tag as address information. Use them to specify a mailing address, e-mail address, telephone number, and so on. Typically, the address text appears italicized and an automatic paragraph break appears before and after.
Example
Mail comments to
Alan
Looks like this in a web browser:
Mail comments to Alan
Netscape Gold Editor
To specify address information with the Netscape Gold Editor, select text and choose Address from the Paragraph Style drop-down list on the toolbar or choose Properties > Paragraph > Address from the menu bar.
Word IA
Select text and choose Address from the Style drop down list.
Top
These tags specify the location and other attributes of a pre-compiled, executable applet that produces live audio, animation, or other Java applications on the Web page. For more details about writing Java applets and information about getting a copy of the HotJava browser, visit http://java.sun.com. Note that Java is not the same as JavaScript.
Top
...
These tags display the text that appears between them in boldface.
Example
When all else fails, read the instructions.
looks like this in a web browser:
When all else fails, read the instructions.
Netscape Gold Editor
Select text and click the Bold button in the toolbar, or press Ctrl+B, or choose Properties > Character > Bold.
Word IA
Select text and click the Bold button in the toolbar, or press Ctrl+B.
Top
This tag records the base URL for the document. Any URLs contained within the document then can be in a form relative to this base address. If you omit the element, the browser resolves any relative URLs by using the URL it originally used to access the document. Place the element between the ... elements.
Attributes
HREF="base URL" Defines the base address for this document.
TARGET = "name" Defines a window or frame to display a document in, where name has already been defined in a tag.
Example
Top
This tag changes the base font size for the document. Any changes increase or decrease the font size relative to the base font size that you have established. Particularly useful for setting a base font size for use with and tags in Netscape Navigator.
Attributes
COLOR = "triplet or name" Defines a color using rgb triplets or (for Netscape Navigator 2), color name (see Color Values).
FACE = "name" Defines a typeface where name is the name of a font on the reader's PC. If the font cannot be found on the reader's PC, the default font (typically Times Roman) is used instead. Currently supported only by Internet Explorer 2.0.
SIZE = n where n is a number between 1 (smallest) and 7 (largest) inclusive. The default is 3.
Example
sets the base font to Arial typeface, in blue, at a slightly larger-than-normal size (about 14 points rather than 12 points.)
Top
Inserts a background sound on the page that's downloaded and played automatically when the reader opens the page. The sound file can be in .WAV, .AU format, or .MID (MIDI) format. Internet Explorer only.
Attributes
SRC="soundfile" Defines the name of the sound file to play in the background.
LOOP=n Where n is a number specifying how many times the sounds. Optionally, you can set n to -1 or INFINITE. If the value is -1 or INFINITE, the sound plays continuously until another page is loaded.
Example
Word IA
Choose Format > Background Sound from Word IA's menu bar.
Top
…
Text between the and tags is shown at a slightly larger size than surrounding text.
Example
If your browser supports the tag, the text between those tags below:
I am regular and I am big I think.
will look larger on your screen (see below):
I am regular and I am big I think.
Top
...
These tags display the text that appears between them as blinking text. Netscape Navigator only.
Example
Don't you just hate blinking text?
If you're viewing this with Netscape Navigator, or some other browser that supports , you'll see some blinking text below:
Don't you just hate blinking text?
Netscape Gold Editor
Select text and choose Properties > Character > Blink.
Top
...
Sets the text between the open and close tags apart from other text on a page, usually to display a lengthy quotation. The appearance of the text depends on the reader's browser, but typically involves extra left and right indents and/or an italic font. Also causes a paragraph break and usually adds space above and below the quoted text.
Example
Famous quote from Romeo in Shakespeare's play:
But soft, what light through yonder window breaks?
'Tis the East, and Juliet is the sun.
Wow, how cool. Don't you wish people still talked like that?
In this web browser that text appears as:
Famous quote from Romeo in Shakespeare's play:
But soft, what light through yonder window breaks?
'Tis the East, and Juliet is the sun.
Wow, how cool. Don't you wish people still talked like that?
Netscape Gold Editor
Select text and choose Properties > Text, click the Paragraph tab, choose Block Quote from the Additional Style drop-down list, and choose OK.
Word IA
Select text and choose Blockquote from the Style drop-down list.
Top
...
This element defines all text and images that make up the page and all items that provide control and formatting for the page.
Attributes
ALINK="color" Defines the color of the active link. Default is red. Supported by many recent browsers.
BACKGROUND="imagefile" Defines the location of an image for use as a page background. The image usually appears tiled. Supported by many recent browsers.
BGCOLOR="color" Defines the color of the page background. Default is grey. Supported by many recent browsers.
BGPROPERTIES=FIXED Makes the background image a watermark that does not scroll as a normal background image does. Internet Explorer only.
LEFTMARGIN="pixels" Indents the left margin of the document the specified number of pixels. Internet Explorer only.
LINK="color" Defines the color of link text. Default is blue. Supported by many recent browsers.
TEXT="color" Defines the color of normal text. Default is black. Supported by many recent browsers.
TOPMARGIN="pixels" Indents the top margin of the document the specified number of pixels. Internet Explorer only.
VLINK="color" Defines the color of visited link text. Default is purple.
The BGCOLOR, LINK, TEXT, and VLINK attributes can use the same colors as the COLOR attribute of the tag. See Color Values.
Example
Body text goes here. Body and text will have "inverted" colors.
Netscape Gold Editor
Choose Properties > Document.
Word IA
Choose Format > Background and Links.
Top
Starts a new line without a blank line. The new line has the same indent as line-wrapped text.
Attributes
CLEAR=margin Breaks the line and moves vertically down until no floating images appear in the specified margin, where margin is left (left margin), right (right margin), or all (both margins). Netscape Navigator and Internet Explorer only.
Example
Here is a sample of my HaikuThe cat
was jonesin'
for some food
Meow.Pretty good, huh?
In a web browser, that text will look like this:
Here is a sample of my Haiku
The cat
was jonesin'
for some food
Meow.
Pretty good, huh?
Netscape Gold Editor
Choose Insert > New Line Break or press Shift+Enter.
Word IA
Press Shift+Enter.
Top
...
Specify the caption for a table. The caption usually is centered with respect to the table. Any document body HTML tag can appear within a caption.
Attributes
ALIGN=alignment Specifies the caption's alignment with respect to the table. Alignment can be top or bottom (default is top). Internet Explorer also allows alignment values of left, right, and center.
VALIGN=alignment Specifies the caption's alignment with respect to the table. Alignment can be top or bottom. Internet Explorer only.
Example
See ...
for an example.
Word IA
Click on the table and choose Table > Caption from the menu bar.
Top
...
Center the text between the left and right margins. Place the text you want to center between the open and closing tags.
Example
Think of Me as a Title
looks like this in a web browser:
Think of Me as a Title
Netscape Gold Editor
Click the Center toolbar button.
Word IA
Click the Center button in the toolbar.
Top
...
The text that appears between these tags represents a citation and typically appears in italics.
Example
This was clearly the decision in Madison vs. Hartunian, 1996.
Looks like this in your web browser:
This was clearly the decision in Madison vs. Hartunian, 1996.
Word IA
Select text and choose CITE from the Style drop-down list.
Top
...
The text that appears between these tags represents programming code and typically appears in monospaced font.
Example
Here's a simple BASIC FOR…NEXT loop that counts from 1 to 10:FOR X = 1 TO 10
? X
NEXT X
And now we're back to regular font.
Here's how those lines look in your web browser:
Here's a simple BASIC FOR…NEXT loop that counts from 1 to 10:
FOR X = 1 TO 10
? X
NEXT X
And now we're back to regular font.
Word IA
Select text and choose CODE from the Style drop-down list.
Top
...
Indicates a comment, which is ignored by the web browser. Identical in function to
Top
...
These tags specify a definition item in a definition list. Definition items typically are indented and formatted paragraph style after the term they define.
Example
See
...
for an example.
Top
...
Marks the defining instance of a term (the first time a term is used.) Most browsers display the text in italics.
Example
If you need a high-performance hard drive, go for SCSI 2.
Looks like this in your word browser:
If you need a high-performance hard drive, go for SCSI 2.
Word IA
Select text to style and choose Definition, DFN from the Style drop-down list.
Top
...
These tags define a directory list in which the items can contain up to 20 characters each. In some browsers, items in a directory list are be arranged in columns, typically 24 characters wide. In a directory list, each list items typically is preceded by bullets and does not have extra white space above or below it.
Example
Student Scores
0-20 (10%)
21-40 (20%)
41-60 (30%)
61-80 (20%)
81-100 (20%)
looks like below in this browser:
Student Scores
0-20 (10%)
21-40 (20%)
41-60 (30%)
61-80 (20%)
81-100 (20%)
Netscape Gold Editor
Select the list and choose Properties > Text > Paragraph > List Item (under Paragraph Style) > Directory List (under Style).
Word IA
Select the list and choose Directory,DIR from the Style drop-down list. To see columnar listing, save and close the document, then reopen it.
Top
...
These tags center, left-align, or right-align text with respect to the current margins on the page. Place the text you want to align between the open and closing tags. Netscape Navigator only.
Attributes
ALIGN="alignment" Specifies how to align the text. Alignment can be left, center, or right.
Examples
Left align this text.
Right align this text.
Center this text.
Looks like this in your current web browser:
Left align this text.
Right align this text.
Center this text.
Top
...
This pair of tags defines a definition list (or description list) that typically consists of definition terms and definition items. Definition lists are perfect for glossary-type lists in which the term appears flush left and the definition is in indented in paragraph style below the term.
Attributes
COMPACT Tells the browser to display the list in a compact format (if possible).
Example
Glossary
HTML
An acronym for Hypertext Markup Language. A set of tags
used to format text in pages published on the World Wide Web.
VRML
An acronym for Virtual Reality Markup Language. A programming
language for creating 3D virtual worlds that can be viewed and
explored over the Internet.
Looks like this in your web browser:
Glossary
HTML
An acronym for Hypertext Markup Language. A set of tags used to format text in pages published on the World Wide Web.
VRML
An acronym for Virtual Reality Markup Language. A programming language for creating 3D virtual worlds that can be viewed and explored over the Internet.
Netscape Gold Editor
Choose either Description Title or Description Text as appropriate; or, choose Properties > Paragraph > Description Title or Properties > Paragraph > Description Text.
Word IA
Type the first term in your definition list.
Press Tab, then type the definition for the term.
After you have typed the definition, press ENTER. Repeat steps 1 through 3 for all the definitions in your list.
Then, select all the text you typed in steps 1 through 3.
In the Style box, click Definition List
or Definition Compact
.
You don't directly apply the Definition Term
style to the terms in your list. Instead, save, close, and reopen the document to see formatted list.
Top
...
Specifies a definition term in a definition list. Definition terms typically are formatted flush left and are followed by the indented definition in a paragraph-style format.
Example
See
...
for an example.
Top
...
Marks emphasized text which is typically displayed in italics.
Example
I really mean what I say, so do not ignore me!
Looks like this in this browser:
I really mean what I say, so do not ignore me!
Word IA
Select text and choose Emphasis,EM from the Style drop-down list.
Top
This tag lets you put a document directly onto an HTML page. You can embed documents of any type (including Netscape plug-ins), although the user must have an application that can view the embedded data. The document appears when the user double-clicks it. Windows version of Netscape Navigator only.
Attributes
ALIGN=alignment Specifies the alignment of the object on the page. Alignment can be left or right.
BORDER=thickness Specifies the thickness of the object's border in pixels.
HEIGHT=height Specifies the height in pixels of the embedded object.
SRC="sourcefile" Specifies the URL or filename of the embedded document file.
WIDTH=width Specifies the width in pixels of the embedded object.
Example
See Also
Netscape's Embed Tag Syntax and, if you're embedding sound, see Netscape's Live Audio Syntax.
Top
...
This pair of tags sets the font size, font color, and font face of text between the open and closing tags. Some browsers support some attributes of this tag pair, but the tags work mainly with Netscape Navigator and Internet Explorer only.
Attributes
SIZE = size Sets the font size relative to the (if basefont is specified). Size can be in the range 1 @nd 7 and can be preceded with an optional + (increase size) or - (decrease size) symbol. Default size is 3.
COLOR="#rrggbb" or COLOR="color" Specifies the font color. You can express color as a hexadecimal RGB triplet (#rrggbb) or color value. Color names work only in Netscape Navigator 2.
FACE=name [,name] [,name] Sets the typeface used to display text, where name is the typeface name. The typeface must already exist on the user's computer; if it doesn't, the specified alternative font (if any) or the browser's default font is used. Internet Explorer only.
Examples
This text is big, green, and Arial typeface in Internet Explorer. It's just big and green and default typeface in Netscape Navigator.
Comes out like this in your current browser:
This text is big, green, and Arial typeface in Internet Explorer. It's just big and green and default typeface in Netscape Navigator.
Netscape Gold Editor
Select text and choose a size from the Size drop-down list on the toolbar or click the Font Color toolbar button and choose a color.
Word IA
Select text and choose Format > Font from the menu bar.
Top
Defines the start and end of a fill-in-the-blank form.
Attributes
ACTION="URL" Specifies the URL where the contents of the form will be submitted. When ACTION is omitted, the URL of the document itself is assumed.
ENCTYPE="format" Specifies the format of the submitted data in case the protocol specified by METHOD doesn't impose a format.
METHOD="method" Specifies the method used by the protocol. Typically, method is GET or POST.
Example
Looks like this in this web browser. (The Submit button won't do anything in this example though):
Your name:
Your address:
Your City, State, Zip:
Word IA
Choose Insert > Form Field from the menu bar.
Top
Defines a single frame within a frameset. Netscape Navigator 2.0 and later only. Must be enclosed within ... tags.
Attributes
MARGINHEIGHT="pixels" Specifies the size of the upper and lower margins for the frame in pixels.
MARGINWIDTH="pixels" Specifies the size of the left and right margins for the frame in pixels.
NAME="window_name" Assigns a name to the frame so that other documents can link to it. Names must start with alphanumeric characters.
NORESIZE Prevents the reader from resizing the frame.
SCROLLING="value" Specifies whether to allow a scroll bar. Value can be yes (scroll bar is always visible), no (scroll bar never appears), or auto (scroll bar appears if necessary; this is the default).
SRC="URL" Specifies the URL of the document to display in this frame. If omitted, the frame appears as blank.
Example
See for an example.
Top
...
The frameset is the main container for a frame. A frame document is similar to a normal HTML document, except the body container is replaced by a FRAMESET container. The frameset container holds the sub-documents, or frames, that make up the page. Netscape Navigator only.
Attributes
COLS="column_width_list" A comma-separated list that defines the number and width of the columns in the window. Each value can be an absolute pixel value, percentage values between 1% and 100%, or relative scaling values (* tells the browser to calculate the width based on the other values given). The total number of columns must equal the window width. If omitted, one column is assumed.
ROWS="row_width_list" Same as the COLS attribute, except that it defines the number and width of the rows in the windows. If omitted, one row is assumed.
Example
Here's a sample structure of a web page that displays frames:
Top
...
Encloses information about the web page - not the content that the reader sees. The tags can appear within the ... tags. The head can also include these tags: ,
, , , and .
Example
<! Appears in browser window frame>
Text and pictures that the reader sees goes inside the … tags.
Top
...
This tag pair formats text between the open and close tags as any of six levels of heading (where n is 1, 2, 3, 4, 5, or 6).
is the highest heading level, followed by
...
. The appearance of each heading style is determined by the browser.
Attributes
ALIGN=alignment Specifies the heading's alignment, which can be left, center, or right.
Example
This is heading level 1
This is heading level 2
This is heading level 3
This is heading level 4
This is heading level 5
This is heading level 6
looks like this in this browser:
This is heading level 1
This is heading level 2
This is heading level 3
This is heading level 4
This is heading level 5
This is heading level 6
Netscape Gold Editor
Choose a Heading option from the Paragraph Style drop-down list on the toolbar, or choose Properties > Paragraph > Heading n from the menu bar.
Word IA
Choose a Heading option from the Style drop-down list.
Top
Draws a horizontal line or rule across the page. Horizontal rules are great for dividing sections of text on the page.
Attributes
ALIGN=alignment Specifies the alignment of the line with respect to current page margins. Alignment can be left, center, or right. Default is center.
NOSHADE Displays the line as a solid bar. Default is shaded and engraved.
SIZE = size Specifies the relative thickness of the line. Size is a number. Default is 2.
WIDTH=pixels or WIDTH=percent% Specifies the width of the line in number of pixels or as a percent of the current page width. Default is 100 percent.
Examples
The tags above look like this in your web browser:
Netscape Gold Editor
Click the Insert Horiz. Line toolbar button, or choose Insert > Horizontal Line from the menu bar. To specify attributes, click on the line to select it. Then choose Properties > Horizontal Line.
Word IA
Click the Horizontal Rule button on the toolbar. To specify attributes, use Insert > HTML Markup.
Top
...
Marks the beginning and end of an entire HTML document.
Example
The following listing shows the basic structure of an HTML document:
...head stuff goes here
...body stuff goes here
Top
...
Displays text between the tags as italicized.
Example
Did you know that SCSI is pronounced scuzzy?
Looks like this in your web browser:
Did you know that SCSI is pronounced scuzzy?
Netscape Gold Editor
Select text and click the Italic toolbar button, or press Ctrl+I.
Word IA
Select text and click the Italic (I) button on the toolbar, or press Ctrl+I.
Top
The element puts inline graphics into your Web pages. You can put elements within anchors to create clickable links. This tag has many attributes, including new ones to allow client-side image maps, embedded inline video, and embedded inline VRML worlds. Many of the new attributes are specific to Internet Explorer and/or Netscape Navigator.
Attributes
ALIGN=alignment Controls how the image alingns with text on the same line. Standard alignment values are top, middle, and bottom. Additional values supported by Netscape Navigator are left, right, texttop, absmiddle, baseline, absbottom.
ALT="alternate_text" Specifies text that appears instead of the inline image in non-graphical environments.
BORDER=thickness Specifies the thickness of the border in pixels.
CONTROLS Displays a set of controls under the inline video clip window.
DYNSRC="video_filename" Specifies the location of an inline video clip (.AVI). Internet Explorer only.
HEIGHT=height Specifies the height of the image in pixels.
HSPACE=horizontal_space Specifies the horizontal_space to the left and right of the image in pixels.
ISMAP Specifies that the image is an image map. Users can click hot spots on the map to access different URLs (if an appropriate image handling script for the map exists on the server).
LOOP=repeat Defines how many times the inline video clip loops when activated, where repeat is a number or the value -1 or INFINITE. If the value is -1 or INFINITE, the video plays continuously until another page is loaded.
LOOPDELAY=delay Specifies the lenght of the wait, in milliseconds, between play loops for an inline video clip.
LOWSRC="low_res_image_file" Specifies the low resolution image to display before the document and all of its images are fully loaded. After loading, the browser displays the image specified by the SRC attribute. Netscape Navigator only (ignored by other browsers).
SRC="image_file" Specifies the URL or filename of the inline image.
START=start Specifies when an inline video clip will play. Start can be FILEOPEN or MOUSEOVER (or both, separated by a comma).
USEMAP="map_location" Specifies the location of a client-side image map. If the map_location starts with #, the image map is in the same document as the tag. The map name is defined in the (directory),
Niciun comentariu:
Trimiteți un comentariu