Appendix A: HTMLXML Reference


Microsoft Office FrontPage 2003 s core function is to translate your design input into clean HTML code that Web browsers can interpret quickly. At the same time, many of the features that are new to FrontPage, which enable groups of Web developers to work collaboratively, take advantage of the power and flexibility of XML. Hopefully, you won t need to spend time manually altering your Web page code and can focus on designing pages the way you want to. But if you ever need to manually edit the HTML or XML that FrontPage generates, the new Code view tools will streamline the process considerably.

Code view, Split view, Code IntelliSense, and Code Snippets all help you work directly with your Web page code when you need to. Sometimes, making slight changes to the code and then seeing the effect in Preview mode can help you learn how the individual commands work. Occasionally, working directly with HTML or XML code can be quicker than using FrontPage s toolbars , menus , or dialog boxes. To help you edit more effectively, the following sections present you with some of the basic commands found in virtually all HTML pages. If you can become familiar with them, you ll better understand what you re viewing and editing in Code or Split view. Table A-1 describes the most common commands used to define HTML or XML documents, and to format text, images, and other elements.

Table A-1: Common HTML Structural and Formatting Elements

Element

What It Does

< HTML > < /HTML >

Identifies an HTML document

< HEAD > < /HEAD >

Encloses the HEAD section of an HTML document

< TITLE > < /TITLE >

Defines the title of an HTML document

< META > < /META >

Contains information about the HTML document as a whole

< !DOCTYPE >

Identifies what type of document this is, usually by giving the version of HTML or XML being used

< BASE > < /BASE >

Specifies the location of external files, or objects needed by a browser

< BODY > < /BODY >

Encloses the BODY section of an HTML document

< !-- -- >

Encloses comments made by the author of the Web page

< P > < /P >

Defines a new paragraph

< A > < /A >

Creates an anchor for a hyperlink to another location

< IMG >

Inserts an image file into the Web page being created

< BR >

Creates a line break

< HR >

Creates a horizontal line

The most basic kind of content on a Web page is text, and HTML provides a variety of commonly-used elements for formatting that text. Some examples are shown in Table A-2.

Table A-2: HTML Elements for Formatting Text

Element

What It Does

< I > < /I >

Encloses text to be displayed in italic type

< B > < /B >

Encloses text to be displayed in bold type

< U > < /U >

Encloses text to be underlined ; this is seldom used, as it can be confused with hyperlinks

< BLOCKQUOTE > < /BLOCKQUOTE >

Encloses text to be formatted with narrower margins than the surrounding text

< Hx > < /Hx >

Defines a Web page heading; x is a variable from 1-6. An H1 heading is displayed in the largest type; an H6 heading is the smallest

< EM > < /EM >

Adds emphasis to text; exact formatting depends on browser

< STRONG > < /STRONG >

Adds stronger emphasis to text; exact formatting depends on browser

< CITE > < /CITE >

Designates a citation or reference; formatting is browser dependent

< DFN > < /DFN >

Designates a definition; formatting is browser dependent

< SMALL > < /SMALL >

Displays text in smaller type than surrounding text

< BIG > < /BIG >

Displays text in larger type than surrounding text

< SUP > < /SUP >

Displays text in superscript

< SUB > < /SUB >

Displays text in subscript

< INS > < /INS >

Displays text as an insertion; exact formatting depends on browser

< ABBR > < /ABBR >

Displays text as an abbreviation; exact formatting depends on browser

< ADDRESS > < /ADDRESS >

Displays text as an address; exact formatting depends on browser

A number of HTML tags are used to define content so that Web page authors can tailor HTML to their own needs. Often, these commands are used with Cascading Style Sheets. Some of these commands (see Table A-3) are usually employed together, such as <DIV ID> or <SPAN CLASS>.

Table A-3: Elements that Add Structure to Documents

Element

What It Does

<DIV> </DIV>

Used to enclose a block of code

ID

An attribute used with DIV, SPAN, or other commands to identify a type of content, such as a name or message. ID is also used as a target anchor for hypertext links

CLASS

An attribute used with DIV, SPAN, or other commands to identify a type of content

< SPAN > < /SPAN >

A container that identifies an inline object, rather than a block of code

In Chapter 11, Advanced Layout with Tables and Layers, you learned how to design pages using tables. If you ever need to edit the HTML code for a page that uses tables, you ll need to recognize the common table- related elements shown in Table A-4.

Table A-4: HTML Table Elements

Element

What It Does

< TABLE > < /TABLE >

Encloses a Web page table

< CAPTION > < /CAPTION >

Defines a caption for a table

< TH > < /TH >

Creates a table header for a column

< TR > < /TR >

Creates a row within a table

< TD > < /TD >

Creates a cell within a row

In Chapter 14, Working with Forms, you learned about creating Web page forms that add interactivity to a Web site. In case you want to edit the HTML for a form that you create, the form-related elements shown in Table A-5 should provide you with a starting point.

Table A-5: HTML Form Elements

Element

What It Does

< FORM > < /FORM >

Encloses a Web page form

ACTION

An attribute used with the FORM command to specify a URL or other location to which data should be submitted

METHOD

An attribute used with the FORM command to specify the method used to process form data; the two common methods are GET and POST

< INPUT > < /INPUT >

A command that can be used with TEXT to create a single-line text box, PASSWORD to create a password box, CHECKBOX to create a check box, RADIO to create a radio button, and so on

< LABEL > < /LABEL >

Used to designate an input variable

< BUTTON > < /BUTTON >

Creates a push-down button

< SELECT > < /SELECT >

Designates a drop-down menu list

< TEXTAREA > < /TEXTAREA >

Creates a multi-line text input box

Keep in mind that, if you use one of FrontPage s Web components to process your form data, you will see commands such as <!--webbot bot="SaveResults" --> in your HTML. Such commands are specific to FrontPage (not to HTML or XML) and designate the Web component to be used to process the data.




Faster Smarter Microsoft Office FrontPage 2003
Faster Smarter Microsoft Office FrontPage 2003
ISBN: 0735619727
EAN: 2147483647
Year: 2004
Pages: 179

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net