Vanessa Marie N. Datumputi BSIT 311 Webprog HTML
Vanessa Marie N. Datumputi BSIT 311 Webprog HTML
. HTML stands for Hyper Text Markup Language HTML is not a programming language, it is a markup language A markup language is a set of markup tags HTML uses markup tags to describe web pages HTML Tags HTML markup tags are usually called HTML tags HTML tags are keywords surrounded by angle brackets like <html> HTML tags normally come in pairs like <b> and </b> The first tag in a pair is the start tag, the second tag is the end tag Start and end tags are also called opening tags and closing tags HTML Documents = Web Pages
HTML documents describe web pages HTML documents contain HTML tags and plain text HTML documents are also called web pages
<!--
comment
<!--This can be viewed in the HTML part of a document--> <a href="http://www.domain.com/"> Visit Our Site</a> <b>Example</b> <big>Example</big>
<a -
anchor
<b> <big>
Example
Example
(Tip)
<body>
HTML document
<br>
line break
The contents of your page<br>The contents of your page <center>This will center your contents</center> <dl> <dt>Definition Term</dt>
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
<center>
center
<dd>
definition
<dl> <dt>Definition Term</dt> <dl> definition list <dd>Definition of the term</dd> <dt>Definition Term</dt> <dd>Definition of the term</dd> </dl>
<dl> <dt>Definition Term</dt> <dt> definition term <dd>Definition of the term</dd> <dt>Definition Term</dt> <dd>Definition of the term</dd> </dl> This is an <em>Example</em> of using the emphasis tag <embed src="yourfile.mid" width="100%" height="60" align="center">
<em>
emphasis
<embed>
embed object
(Tip)
<embed src="yourfile.mid" autostart="true" <embed> embed object hidden="false" loop="false"> <noembed><bgsound src="yourfile.mid" loop="1"></noembed> 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 face="Times New Roman">Example</font> Example (Tip)
<font>
font
Example (Tip)
<font>
font
Example
Name: (Tip)
(Tip)
Top of Form
<form action="mailto:[email protected]"> Name: <input name="Name" value="" size="10"><br> <form> form Email: <input name="Email" value="" size="10"><br> <center><input type="submit"></center> </form>
Email:
Submit
Bottom of Form
<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>
Contents of your web page (Tip) <hr> horizontal rule <hr /> Contents of your web page Contents of your web page <hr> horizontal rule <hr width="50%" size="3" /> Contents of your web page Contents of your web page <hr> horizontal rule <hr width="50%" size="3" noshade /> Contents of your web page <hr> horizontal <hr width="75%" color="#ff0000" size="4" /> Contents of your web page
(Internet Explorer)
horizontal rule
<hr width="25%" color="#6699ff" size="6" /> Contents of your web page <html> <head> <meta> <title>Title of your web page</title> </head> <body>HTML web page contents </body> </html> Contents of your web page
<i>
italic
<i>Example</i>
Example
<img>
image
<img src="Earth.gif" width="41" height="41" border="0" alt="text describing the image" /> (Tip)
Example 1: <form method=post action="/cgi-bin/example.cgi"> <input type="text" size="10" maxlength="30"> <input type="Submit" value="Submit"> </form>
Top of Form
Example 1: (Tip)
<input>
input field
Submit
Bottom of Form
Example 2: <form method=post action="/cgi-bin/example.cgi"> <input> (Internet Explorer) input field <input type="text" style="color: #ffffff; fontfamily: Verdana; font-weight: bold; font-size: 12px; background-color: #72a4d2;" size="10" maxlength="30"> <input type="Submit" value="Submit"> </form> Example 3: <form method=post action="/cgi-bin/example.cgi"> <table border="0" cellspacing="0" <input> 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>
Top of Form
Example 2: (Tip)
Submit
Bottom of Form
Top of Form
Example 3: (Tip)
Bottom of Form
Top of Form
Example 4: (Tip) Example 4: <form method=post action="/cgi-bin/example.cgi"> Enter Your Comments:<br> <input> 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>
Submit
Clear
Bottom of Form
Example 5: <form method=post action="/cgi-bin/example.cgi"> <center> Select an option: <select> <option >option 1</option> <input> input field <option selected>option 2</option> <option>option 3</option> <option>option 4</option> <option>option 5</option> <option>option 6</option> </select><br> <input type="Submit" value="Submit"></center> </form> <input> input field Example 6: <form method=post action="/cgi-bin/example.cgi"> Select an option:<br> <input type="radio" name="option"> Option 1 <input type="radio" name="option" checked> Option 2 <input type="radio" name="option"> Option 3 <br> <br> Select an option:<br> <input type="checkbox" name="selection"> Selection 1 <input type="checkbox" name="selection" checked> Selection 2 <input type="checkbox" name="selection"> Selection 3 <input type="Submit" value="Submit"> </form> Selection 1 Option 3 Select an option: Option 2 Option 1 Select an option: Select an option:
Top of Form
Example 5: Tip)
option 2
Submit
Bottom of Form
Top of Form
Example 6: (Tip)
Selection 2
Selection 3
Submit
Bottom of Form
Example 1: <menu> <li type="disc">List item 1</li> <li type="circle">List item 2</li> <li type="square">List item 3</li> </MENU> <li> list item Example 2: <ol type="i"> <li>List item 1</li> <li>List item 2</li> <li>List item 3</li> <li>List item 4</li> </ol> <head> <link> link <link rel="stylesheet" type="text/css" href="style.css" /> </head> Example 1: (Tip) List item 1 List item 2 List item 3
Example 2: i. ii. iii. iv. List item 1 List item 2 List item 3 List item 4
scrolling text
<marquee bgcolor="#cccccc" loop="-1" scrollamount="2" width="100%">Example Marquee</marquee> (Tip) <menu> <li type="disc">List item 1</li> List item 1 List item 2 List item 3
<menu>
menu
<li type="circle">List item 2</li> <li type="square">List item 3</li> </menu> <meta name="Description" content="Description of
<meta>
meta
your site"> <meta name="keywords" content="keywords describing your site"> <meta HTTP-EQUIV="Refresh" CONTENT="4;URL=http://www.yourdomain.com/"> <meta http-equiv="Pragma" content="no-cache"> <meta name="rating" content="General"> <meta name="robots" content="all"> <meta name="robots" content="noindex,follow"> Numbered <ol> <li>List item 1</li>
<meta>
meta
Nothing will show (Tip) Nothing will show (Tip) Nothing will show (Tip) Nothing will show (Tip) Numbered 1. List item 1
<li>List item 2</li> <li>List item 3</li> <li>List item 4</li> </ol> Numbered Special Start <ol start="5"> <li>List item 1</li> <li>List item 2</li> <li>List item 3</li> <li>List item 4</li> </ol> Lowercase Letters <ol type="a"> <li>List item 1</li> <li>List item 2</li> <li>List item 3</li> <li>List item 4</li> </ol> Capital Letters <ol type="A"> <li>List item 1</li> <li>List item 2</li> <li>List item 3</li> <li>List item 4</li> </ol> Capital Letters Special Start <ol type="A" start="3"> <li>List item 1</li> <li>List item 2</li> <li>List item 3</li> <li>List item 4</li> </ol> Lowercase Roman Numerals <ol type="i"> <li>List item 1</li> <li>List item 2</li> <li>List item 3</li> <li>List item 4</li> </ol> Capital Roman Numerals <ol type="I"> <li>List item 1</li> <li>List item 2</li> <li>List item 3</li> <li>List item 4</li> </ol> Capital Roman Numerals Special Start <ol type="I" start="7"> <li>List item 1</li> <li>List item 2</li> <li>List item 3</li> <li>List item 4</li>
2. 3. 4.
Numbered Special Start 5. 6. 7. 8. List item 1 List item 2 List item 3 List item 4
Lowercase Letters a. b. c. d. List item 1 List item 2 List item 3 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
III. List item 3 IV. List item 4 Capital Roman Numerals Special Start VII. List item 1 VIII.List item 2 IX. List item 3 X. List item 4
</ol> <form method=post action="/cgi-bin/example.cgi"> <center> Select an option: <select> <option>option 1</option> <option> listbox option <option selected>option 2</option> <option>option 3</option> <option>option 4</option> <option>option 5</option> <option>option 6</option> </select><br> </center> </form> This is an example displaying the use of the paragraph tag. <p> This will create a line 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> <p> paragraph <br> 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 strong emphasis This is an example displaying the use of the paragraph tag. 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.
Top of Form
Select an option: (Tip)
option 2
Bottom of Form
<small>
<small>Example</small>
Example (Tip)
<strike>
<strike>Example</strike>
Example
<strong>
<strong>Example</strong>
Example
<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: Example 2: (Tip) Column 1 Column 2
<table cellpadding="2" cellspacing="2" width="100%"> Column 1 <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> <table border="2" cellpadding="2" cellspacing="2" width="100%"> <tr> <td> table data <td>Column 1</td> <td>Column 2</td> </tr> </table> <th> table header <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> <tr> <td>Row 4</td> <td>Row 4</td> <td>Row 4</td> Column 1 Row 2
Column 2
Column 1
Row 2 Row 3 Row 4
Colum n 2
Row 2 Row 3 Row 4
Column 3
Row 2 Row 3 Row 4
</tr> </table> </div> document title Title of your web page will be viewable in the title bar. (Tip) Column 1 Column 2
<title>
<table border="2" cellpadding="2" cellspacing="2" width="100%"> <tr> <tr> table row <td>Column 1</td> <td>Column 2</td> </tr> </table> <tt> <u> teletype underline <tt>Example</tt> <u>Example</u> Example 1:<br> <br> <ul> <li>List item 1</li> <li>List item 2</li> </ul> <br> <ul> unordered list Example 2:<br> <ul type="disc"> <li>List item 1</li> <li>List item 2</li> <ul type="circle"> <li>List item 3</li> <li>List item 4</li> </ul> </ul>
Example
Example