What is HTML?
HTML is a language for describing web pages. 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 The markup tags describe how text should be displayed
HTML Tags
EXAMPLE:
<html> <body> The content of the body element is displayed in your browser. </body> </html>
HTML PARAGRAPHS
<html> <body> <p>This is a paragraph.</p> <p>This is a paragraph.</p> <p>This is a paragraph.</p> <p>Paragraph elements are defined by the p tag.</p> </body> </html>
HTML TAGS
HEADING: <h1>This is a heading </h1> <h2>This is a heading </h2> <h3>This is a heading </h3>
HTML LINE BREAKS < p>This is<br />a para<br />graph with line breaks</p>
HTML
HTML COMMENTS
HTML
CENTER ALIGNED HEADING
<h1 align="center">This is heading 1</h1> <body bgcolor="yellow"> <table border="1"> HTML TEXT FORMATTING
<p><b>This text is bold</b></p> <p><big>This text is big</big></p> <p><i>This text is italic</i></p> <p><code>This is computer output</code></p> <p>This is<sub> subscript</sub> and <sup>superscript</sup></p>
HTML
DELETED AND INSERTED TEXT <p> a dozen is Output: <del>twenty</del> a dozen is twenty twelve pieces <ins>twelve</ins> pieces </p> HYPER LINK <a href="http://www.microsoft.com/">This text</a> is a link to a page on
< >
< >
< >
&
ampersand
cent
&
¢
&
¢
euro section
copyright
€ §
©
€ §
©
registered trademark
®
®
HTML FRAMES
With frames, you can display more than one Web page in the same browser window. VERTICAL FRAME SET
* <html> <frameset cols="25%,50%,25%"> <frame src="frame_a.htm"> <frame src="frame_b.htm"> <frame src="frame_c.htm"> </frameset>
OUTPUT
</html>
FRAME SET
HORIZONTAL FRAME SET
<html> <frameset rows="25%,50%,25%"> <frame src="frame_a.htm"> <frame src="frame_b.htm"> <frame src="frame_c.htm"> </frameset>
OUTPUT
</html>
NAVIGATION FRAME
<html>
<frameset cols="120,*">
HTML TABLES
With HTML you can create tables.
<table border="1"> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr> <td>row 2, cell 1</td> <td>row 2, cell 2</td> </tr> </table>
OUTPUT
HTML
CELL PADING <table border="1" cellpadding="10">
AN UNORDERED LIST
<html> <body> <h4>An Unordered List:</h4> <ul> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ul> </body> </html> OUTPUT
An Unordered List
ORDERED LISTS
OUTPUT
<html> <body> <h4>Numbered list:</h4> <ol> OR <li>Apples</li> <li>Bananas</li> <li>Lemons</li> <li>Oranges</li> </ol> ////////////////////////////////// <ol type="a">
Numbered list:
TEXT FIELDS
RADIO BUTTONS && FORM Radio Buttons are used when you want the user to select one of a limited number of choices. <form> <input type="radio" name="sex" value="male"> Male <br> <input type="radio" name="sex" value="female">Female </form>
OUTPUT
Male
Female
EXAMPLE: TEXTAREA
This example demonstrates how to create a text-area (a multi-line text input control). A user can write text in the text-area. In a text-area you can write an unlimited number of characters.
OUTPUT