Sei sulla pagina 1di 15

Tag <!

-<A <B> <BIG> <BODY>

Name comment anchor bold

Code Example <!--This can be viewed in the HTML part of a document--> <A HREF="http://www.yourdomain.com/">Visit Our Site</A> <B>Example</B>

Browser View Nothing will show (Tip) Visit Our Site (Tip) Example

big (text) <BIG>Example</BIG> body of <BODY>The content of your HTML HTML page</BODY> document The contents of your page<BR>The line break contents of your page <CENTER>This will center your contents</CENTER>

Example (Tip)
Contents of your web page (Tip) The contents of your web page The contents of your web page This will center your contents Definition Term Definition of the term Definition Term Definition of the term Definition Term Definition of the term Definition Term Definition of the term Definition Term Definition of the term Definition Term Definition of the term This is an Example of using the emphasis tag (Tip)

<BR>

<CENTER> center

<DD>

<DL> <DT>Definition Term definition <DD>Definition of the term descriptio <DT>Definition Term n <DD>Definition of the term </DL> <DL> <DT>Definition Term definition <DD>Definition of the term list <DT>Definition Term <DD>Definition of the term </DL> <DL> <DT>Definition Term definition <DD>Definition of the term term <DT>Definition Term <DD>Definition of the term </DL> emphasis embed object embed object This is an <EM>Example</EM> of using the emphasis tag <EMBED src="yourfile.mid" width="100%" height="60" align="center"> <EMBED src="yourfile.mid" autostart="true" hidden="false" loop="false"> <noembed><bgsound src="yourfile.mid" loop="1"></noembed>

<DL>

<DT>

<EM> <EMBED> <EMBED>

Music will begin playing when your page is loaded

and will only play one time. A control panel will be displayed to enable your visitors to stop the music. <FONT> <FONT> <FONT> font font font <FONT FACE="Times New Roman">Example</FONT> <FONT FACE="Times New Roman" SIZE="4">Example</FONT> <FONT FACE="Times New Roman" SIZE="+3" COLOR="#FF0000">Example</FONT> <FORM action="mailto:you@yourdomain.com"> Name: <INPUT name="Name" value="" size="10"><BR> Email: <INPUT name="Email" value="" size="10"><BR> <CENTER><INPUT type="submit"></CENTER> </FORM>

Example (Tip)

Example (Tip)

Example (Tip)
Name: Email:

(Tip)

<FORM>

form

Submit Query

<H1> <H2> <H3> <H4> <H5> <H6>

heading 1 heading 2 heading 3 heading 4 heading 5 heading 6

<H1>Heading 1 Example</H1> <H2>Heading 2 Example</H2> <H3>Heading 3 Example</H3> <H4>Heading 4 Example</H4> <H5>Heading 5 Example</H5> <H6>Heading 6 Example</H6>

<HEAD>

heading <HEAD>Contains elements describing the of HTML document</HEAD> document horizontal <HR> rule horizontal <HR WIDTH="50%" SIZE="3"> rule horizontal <HR WIDTH="50%" SIZE="3" NOSHADE> rule horizontal <HR WIDTH="75%" COLOR="#FF0000" rule SIZE="4"> horizontal <HR WIDTH="25%" COLOR="#6699FF" rule SIZE="6"> hypertext <HTML><HEAD><META><TITLE>Title of markup your web

Nothing will show

<HR>

Contents of your web page (Tip) Contents of your web page Contents of your web page Contents of your web page Contents of your web page Contents of your web page Contents of your web page Contents of your web page Contents of your web page Contents of your web page Contents of your web page

<HR> <HR> <HR> (Internet Explorer) <HR> (Internet Explorer) <HTML>

language <I> <IMG> italic image

page</TITLE></HEAD><BODY>HTML web page contents</BODY></HTML> <I>Example</I> <IMG SRC="Earth.gif" WIDTH="41" HEIGHT="41" BORDER="0" ALT="text describing the image"> Example 1: Example

(Tip)

<INPUT>

<FORM METHOD=post ACTION="/cgiinput field bin/example.cgi"> <INPUT type="text" size="10" maxlength="30"> <INPUT type="Submit" VALUE="Submit"> </FORM> Example 2:

Example 1: (Tip)

Submit

<INPUT> (Internet Explorer)

<FORM METHOD=post ACTION="/cgiExample 2: (Tip) bin/example.cgi"> <INPUT type="text" STYLE="color: input field #FFFFFF; font-family: Verdana; font-weight: Submit bold; font-size: 12px; background-color: #72A4D2;" size="10" maxlength="30"> <INPUT type="Submit" VALUE="Submit"> </FORM> Example 3: Example 3: (Tip) <FORM METHOD=post ACTION="/cgibin/example.cgi"> <TABLE BORDER="0" CELLSPACING="0" input field CELLPADDING="2"><TR><TD BGCOLOR="#8463FF"><INPUT type="text" size="10" MAXLENGTH="30"></TD><TD BGCOLOR="#8463FF" VALIGN="Middle"> <INPUT type="image" name="submit" src="yourimage.gif"></TD></TR> </TABLE> </FORM> Example 4: <FORM METHOD=post ACTION="/cgibin/example.cgi"> Enter Your Comments:<BR> input field <TEXTAREA wrap="virtual" name="Comments" rows=3 cols=20 MAXLENGTH=100></TEXTAREA><BR> <INPUT type="Submit" VALUE="Submit"> <INPUT type="Reset" VALUE="Clear"> </FORM> input field Example 5: Example 5: (Tip) <FORM METHOD=post ACTION="/cgibin/example.cgi"> Select an option: Example 4: (Tip)

<INPUT>

<INPUT>

Submit

Clear

<INPUT>

<CENTER> Select an option: <SELECT> <OPTION >option 1 <OPTION SELECTED>option 2 <OPTION>option 3 <OPTION>option 4 <OPTION>option 5 <OPTION>option 6 </SELECT><BR> <INPUT type="Submit" VALUE="Submit"></CENTER> </FORM> Example 6:

Submit

<INPUT>

Example 6: (Tip) <FORM METHOD=post ACTION="/cgibin/example.cgi"> Select an option:<BR> Select an option: <INPUT type="radio" name="option"> Option 1 Option 1 <INPUT type="radio" name="option" Option 2 CHECKED> Option 2 <INPUT type="radio" name="option"> Option 3 input field Option 3 <BR> Select an option: <BR> Select an option:<BR> Selection 1 <INPUT type="checkbox" name="selection"> Selection 1 Selection 2 <INPUT type="checkbox" name="selection" Selection 3 CHECKED> Selection 2 <INPUT type="checkbox" Submit name="selection"> Selection 3 <INPUT type="Submit" VALUE="Submit"> </FORM> Example 1: (Tip) Example 1: <MENU> <LI type="disc">List item 1 <LI type="circle">List item 2 <LI type="square">List item 3 </MENU> o List item 1 List item 2 List item 3

<LI>

list item

Example 2: <OL type="i"> <LI>List item 1 <LI>List item 2 <LI>List item 3 <LI>List item 4 </OL> Example 2:

i. ii. iii. iv.

List item 1 List item 2 List item 3 List item 4

<LINK>

link

<head> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <MARQUEE bgcolor="#CCCCCC" loop="-1" scrollamount="2" width="100%">Example

<MARQUE E> scrolling (Internet text Explorer)

Marquee</MARQUEE>
(Tip) <MENU> <LI type="disc">List item 1 <LI type="circle">List item 2 <LI type="square">List item 3 </MENU> <META name="Description" content="Description of your site"> <META name="keywords" content="keywords describing your site"> o List item 1 List item 2 List item 3

<MENU>

menu

<META>

meta

Nothing will show (Tip)

<META> <META> <META> <META> <META> <OL>

meta meta meta meta meta ordered list

<META HTTP-EQUIV="Refresh" CONTENT="4;URL=http://www.yourdomain. Nothing will show (Tip) com/"> <META http-equiv="Pragma" content="nocache"> <META name="rating" content="General"> <META name="ROBOTS" content="ALL"> <META NAME="ROBOTS" content="NOINDEX,FOLLOW"> Numbered <OL> <LI>List item 1 <LI>List item 2 <LI>List item 3 <LI>List item 4 </OL> Numbered Special Start <OL start="5"> <LI>List item 1 <LI>List item 2 <LI>List item 3 <LI>List item 4 </OL> Lowercase Letters Nothing will show (Tip) Nothing will show (Tip) Nothing will show (Tip) Nothing will show (Tip) Numbered

1. 2. 3. 4.

List item 1 List item 2 List item 3 List item 4

Numbered Special Start

5. 6. 7. 8.

List item 1 List item 2 List item 3 List item 4

Lowercase Letters

a. List item 1 b. List item 2

<OL type="a"> <LI>List item 1 <LI>List item 2 <LI>List item 3 <LI>List item 4 </OL> Capital Letters <OL type="A"> <LI>List item 1 <LI>List item 2 <LI>List item 3 <LI>List item 4 </OL> Capital Letters Special Start <OL type="A" start="3"> <LI>List item 1 <LI>List item 2 <LI>List item 3 <LI>List item 4 </OL> Lowercase Roman Numerals <OL type="i"> <LI>List item 1 <LI>List item 2 <LI>List item 3 <LI>List item 4 </OL> Capital Roman Numerals <OL type="I"> <LI>List item 1 <LI>List item 2 <LI>List item 3 <LI>List item 4 </OL> Capital Roman Numerals Special Start <OL type="I" start="7"> <LI>List item 1 <LI>List item 2 <LI>List item 3 <LI>List item 4 </OL> <OPTION> listbox <FORM METHOD=post ACTION="/cgi-

c. List item 3 d. List item 4


Capital Letters

A. B. C. D.

List item 1 List item 2 List item 3 List item 4

Capital Letters Special Start

C. D. E. F.

List item 1 List item 2 List item 3 List item 4

Lowercase Roman Numerals

i. ii. iii. iv.

List item 1 List item 2 List item 3 List item 4

Capital Roman Numerals

I. II. III. IV.

List item 1 List item 2 List item 3 List item 4

Capital Roman Numerals Special Start

VII. VIII. IX. X.

List item 1 List item 2 List item 3 List item 4

Select an option: (Tip)

option

bin/example.cgi"> <CENTER> Select an option: <SELECT> <OPTION>option 1 <OPTION SELECTED>option 2 <OPTION>option 3 <OPTION>option 4 <OPTION>option 5 <OPTION>option 6 </SELECT><BR> </CENTER> </FORM>

This is an example This is an example displaying the use of the displaying the use of the paragraph tag. <P> This will create a line paragraph tag. break and a space between lines. Attributes: Example 1:<BR> <BR> <P align="left"> This is an example<BR> displaying the use<BR> of the paragraph tag.<BR> paragrap <BR> h Example 2:<BR> <BR> <P align="right"> This is an example<BR> displaying the use<BR> of the paragraph tag.<BR> <BR> Example 3:<BR> <BR> <P align="center"> This is an example<BR> displaying the use<BR> of the paragraph tag. small (text) deleted text <SMALL>Example</SMALL> <STRIKE>Example</STRIKE> This will create a line break and a space between lines. Attributes: Example 1: This is an example displaying the use of the paragraph tag. Example 2: This is an example displaying the use of the paragraph tag. Example 3: This is an example displaying the use of the paragraph tag.
Example

<P>

<SMALL> <STRIKE> <STRONG>

(Tip)

Example Example Example 1: (Tip)

strong <STRONG>Example</STRONG> emphasis Example 1:

<TABLE>

table

Column 1 Column 2 <TABLE BORDER="4" CELLPADDING="2" CELLSPACING="2" WIDTH="100%"> <TR> Example 2: (Tip) <TD>Column 1</TD>

<TD>Column 2</TD> </TR> </TABLE> Example 2: (Internet Explorer) <TABLE BORDER="2" BORDERCOLOR="#336699" CELLPADDING="2" CELLSPACING="2" WIDTH="100%"> <TR> <TD>Column 1</TD> <TD>Column 2</TD> </TR> </TABLE> Example 3: <TABLE CELLPADDING="2" CELLSPACING="2" WIDTH="100%"> <TR> <TD BGCOLOR="#CCCCCC">Column 1</TD> <TD BGCOLOR="#CCCCCC">Column 2</TD> </TR> <TR> <TD>Row 2</TD> <TD>Row 2</TD> </TR> </TABLE>

Column 1

Column 2

Example 3: (Tip) Column 1 Row 2 Column 2 Row 2

<TD>

<TABLE BORDER="2" CELLPADDING="2" CELLSPACING="2" WIDTH="100%"> <TR> table data <TD>Column 1</TD> Column 1 <TD>Column 2</TD> </TR> </TABLE> <DIV align="center"><TABLE> <TR> <TH>Column 1</TH> <TH>Column 2</TH> <TH>Column 3</TH> </TR> <TR> <TD>Row 2</TD> <TD>Row 2</TD> <TD>Row 2</TD> </TR> <TR> <TD>Row 3</TD> <TD>Row 3</TD> <TD>Row 3</TD> </TR>

Column 2

Column Column Column 1 2 3 Row 2 Row 2 Row 2 Row 3 Row 3 Row 3 Row 4 Row 4 Row 4

<TH>

table header

<TR> <TD>Row 4</TD> <TD>Row 4</TD> <TD>Row 4</TD> </TR> </TABLE> </DIV> <TITLE> document <TITLE>Title of your HTML page</TITLE> title Title of your web page will be viewable in the title bar. (Tip) Column 2

<TR>

<TABLE BORDER="2" CELLPADDING="2" Column 1 CELLSPACING="2" WIDTH="100%"> <TR> table row <TD>Column 1</TD> <TD>Column 2</TD> </TR> </TABLE> teletype <TT>Example</TT> Example Example Example 1: underline <U>Example</U> Example 1:<BR> <BR> <UL> <LI>List item 1 <LI>List item 2 </UL> <BR> unordere Example 2:<BR> d list <UL type="disc"> <LI>List item 1 <LI>List item 2 <UL type="circle"> <LI>List item 3 <LI>List item 4 </UL> </UL>

<TT> <U>

List item 1 List item 2

<UL>

Example 2: List item 1 List item 2 o List item 3 o List item 4

HTML Basic Document


<html> <head> <title>Document name goes here</title> </head> <body> Visible text goes here </body> </html>

Heading Elements
<h1>Largest Heading</h1> <h2> . . . </h2> <h3> . . . </h3> <h4> . . . </h4> <h5> . . . </h5> <h6>Smallest Heading</h6>

Text Elements
<p>This is a paragraph</p> <br> (line break) <hr> (horizontal rule) <pre>This text is preformatted</pre>

Logical Styles
<em>This text is emphasized</em> <strong>This text is strong</strong> <code>This is some computer code</code>

Physical Styles
<b>This text is bold</b> <i>This text is italic</i>

Links, Anchors, and Image Elements


<a href="http://www.example.com/">This is a Link</a> <a href="http://www.example.com/"><img src="URL" alt="Alternate Text"></a> <a href="mailto:webmaster@example.com">Send e-mail</a>

A named anchor: <a name="tips">Useful Tips Section</a> <a href="#tips">Jump to the Useful Tips Section</a>

Unordered list
<ul> <li>First item</li> <li>Next item</li> </ul>

Ordered list
<ol> <li>First item</li> <li>Next item</li> </ol>

Definition list
<dl> <dt>First term</dt> <dd>Definition</dd> <dt>Next term</dt> <dd>Definition</dd> </dl>

Tables
<table border="1"> <tr> <th>someheader</th> <th>someheader</th> </tr> <tr> <td>sometext</td> <td>sometext</td> </tr> </table>

Frames
<frameset cols="25%,75%"> <frame src="page1.htm"> <frame src="page2.htm"> </frameset>

Forms
<form action="http://www.example.com/test.asp" method="post/get"> <input type="text" name="lastname" value="Nixon" size="30" maxlength="50"> <input type="password"> <input type="checkbox" checked="checked"> <input type="radio" checked="checked"> <input type="submit"> <input type="reset"> <input type="hidden"> <select> <option>Apples <option selected>Bananas <option>Cherries </select> <textarea name="Comment" rows="60" cols="20"></textarea> </form>

Entities
&lt; is the same as < &gt; is the same as > &#169; is the same as

Other Elements
<!-- This is a comment --> <blockquote> Text quoted from some source. </blockquote> <address> Address 1<br> Address 2<br> City<br> </address> Source : http://www.w3schools.com/html/html_quick.asp

ALTERNATE

Example code: <FONT SIZE="4" FACE="courier" COLOR=blue><MARQUEE WIDTH=100% BEHAVIOR=ALTERNATE BGColor=yellow>This is an example of an alternating marquee...</MARQUEE></FONT> Result of example code:

SCROLL Example code: <FONT SIZE="4" FACE="courier" COLOR=blue><MARQUEE WIDTH=100% BEHAVIOR=SCROLL BGColor=yellow LOOP=3>This is an example of a scrolling marquee...</MARQUEE></FONT> Result of example code:

SLIDE Example code: <FONT SIZE="4" FACE="courier" COLOR=blue><MARQUEE WIDTH=100% BEHAVIOR=SLIDE BGColor=yellow>This is an example of a sliding marquee...</MARQUEE></FONT> Result of example code:

To the Table of Contents

DIRECTION
Example code: <FONT SIZE="4" FACE="courier" COLOR=blue><MARQUEE WIDTH=100% BEHAVIOR=SCROLL DIRECTION=RIGHT BGColor=yellow>This is an example of a marquee scrolling to the right...</MARQUEE></FONT> Result of example code:

To the Table of Contents

DIRECTION
Example code: <FONT SIZE="4" FACE="courier" COLOR=blue><MARQUEE WIDTH=100% BEHAVIOR=SCROLL DIRECTION=RIGHT BGColor=yellow>This is an example of a marquee scrolling to the right...</MARQUEE></FONT> Result of example code:

To the Table of Contents

SIZING
HEIGHT / WIDTH Example code: <FONT SIZE="4" FACE="courier" COLOR=blue><MARQUEE BEHAVIOR=SCROLL HEIGHT=25 WIDTH=300 BGColor=yellow>This is an example of a scrolling marquee</MARQUEE></FONT> Result of example code:

HSPACE / VSPACE Example code: Preceeding text. <FONT SIZE="4" FACE="courier" COLOR=blue><MARQUEE WIDTH=100% BEHAVIOR=SCROLL HSPACE=15 VSPACE=25 BGColor=yellow>This is an example of a scrolling marquee</MARQUEE></FONT> Following text. Result of example code:

Preceeding text.

Potrebbero piacerti anche