KEMBAR78
HTML Basic Concepts or Introduction of HTML | PPTX
Subject :
Web application Development
Instructor:
Muhammad Jameel
Assessments
 Quiz’s (10)
• Total 4 Quiz’s
 Assignments(10)
• Total 4 Assignments
 Mid Term (20)
 Final Term (35)
 Project (25)
Proposal +Project +Documents
INTRODUCTION TO HTML
 With HTML you can create your own Web site.
 HTML stands for Hyper Text Markup Language.
 HTML is derived from a language SGML (Standard
Graphics Markup Language).
 The future of HTML is XML (eXtended 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 is not case sensitive language.
 HTML documents contain HTML tags and plain text.
HTML Elements and Tags
• A tag is always enclosed in angle bracket
<>like <HTML>
• HTML tags normally come in pairs like
<HTML> and </HTML> i.e.
Start tag = <HTML>
End tag =</HTML>
• Start and end tags are also called opening
tags and closing tags
HOW TO START
• Write html code in notepad , Notepad++, Sublime,
Dream Viewer, Visual Studio ,Atom and etc.
• Save the file with (.Html)/(.Htm) extension.
• View the page in any web browser viz.
INTERNET EXPLORER, NETSCAPE
NAVIGATOR etc.
• The purpose of a web browser (like internet explorer or
firefox) is to read html documents and display them as
web pages.
Code With HTML
<HTML>
<HEAD>
<TITLE>
MY FIRST PAGE
</TITLE>
</HEAD>
<BODY>
Web Application Development
</BODY>
</HTML>
Web Application Development
Explain these tags
• <HTML> - Describe HTML web page that is
to be viewed by a web browser.
• <HEAD> - This defines the header section
of the page.
• <TITLE> - This shows a caption in the title
bar of the page.
• <BODY> - This tag show contents of the
web page will be displayed.
Types of HTML Tags
There are two different types of tags:->
Container Element:->
Container Tags contains start tag & end tag i.e.
<HTML>… </HTML>
Empty Element:->
Empty Tags contains start tag i.e.
<BR>
Text Formatting Tags
Heading Element:->
• There are six heading elements
(<H1>,<H2>,<H3>,<H4>, <H5>,<H6>).
• All the six heading elements are container
tag and requires a closing tag.
• <h1> will print the largest heading
• <h6> will print the smallest heading
Heading Tag Code
<html>
<head><title>heading</title></head>
<body>
<h1> WEB APPLICATION DEVELOPMENT</h1>
<h2> WEB APPLICATION DEVELOPMENT </h2>
<h3> WEB APPLICATION DEVELOPMENT </h3>
<h4> WEB APPLICATION DEVELOPMENT </h4>
<h5> WEB APPLICATION DEVELOPMENT </h5>
<h6> WEB APPLICATION DEVELOPMENT </h6>
</body>
Result of Heading Code
HTML Paragraph Tag
• HTML documents are divided into paragraphs.
• Paragraphs are defined with the <p> tag i.e.
<p>This is a paragraph</p>
<p>This is another paragraph</p>
<pre>This text is preformatted</pre>
Line Break& Horizontal Line Tag
• if you want a line break or a new line without starting a new
paragraph Use the <br> tag.
• Defines a horizontal line use <hr>tag.
• <br> <hr> element are empty HTML element i.e. <hr>
<br> Channel
Text Formatting Tags
<b>
<big>
<em>
<i>
<small>
<strong>
<sub>
<super>
<ins>
<del>
<tt>
<u>
<strike>
Defines bold text
Defines big text
Defines emphasized text
Defines italic text
Defines small text
Defines strong text
Defines
subscripted text
Defines superscripted text
Defines inserted text
Defines deleted text
Defines teletype text
Defines underline text
Defines strike text
Text Formatting Code
<html>
<head></head>
<body>
<b>This text is Bold</b>
<br><em>This text is Emphasized</em>
<br><i>This text is Italic</i>
<br><small>This text is Small</small>
<br>This is<sub> Subscript</sub> and
<sup>Superscript</sup>
<br><strong>This text is Strong</strong>
<br><big>This text is Big</big>
<br><u>This text is Underline</u>
<br><strike>This text is Strike</strike>
<br><tt>This text is Teletype</tt>
</body>
</html>
Result of Text Formatting Code
Font Tag
• This element is used to format the size,
typeface and color of the enclosed text.
• The commonly used fonts for web pages
are Arial, Comic Sans MS , Lucida Sans
Unicode, Arial Black, Courier New, Times
New Roman, Arial Narrow, Impact,
Verdana.
• The size attribute in font tag takes values
from 1 to 7.
Font Tag Code
<html>
<head><title> fonts</title></head>
<body>
<br><font color=“green" size="7" face="Arial"> WEB
APPLICATION DEVELOPMENT </font>
<br><font color=“green" size="6" face="Comic Sans MS ">
WEB APPLICATION DEVELOPMENT </font>
<br><font color=“green" size="5" face="Lucida Sans
Unicode">
MCS-4C 2ND SEMESTER </font>
<br><font color=“green" size="4" face="Courier
New">SUPERIOR UNIVERSITY GOLD CAMPUS, LAHORE
</font>
<br><font color=“green" size="3" face="Times New
Roman">
WEB APPLICATION DEVELOPMENT </font>
<br><font color=“green" size="2" face="Arial Black"> WEB
APPLICATION DEVELOPMENT </font>
<br><font color=“green" size="1" face="Impact"> WEB
APPLICATION DEVELOPMENT </font>
</body>
</html>
Result of Font Code
Background & Text Color Tag
• The attribute bgcolor is used for changing the back ground
color of the page.
<body bgcolor=“Green” >
• Text is use to change the color of the enclosed text.
<body text=“White”>
Text Alignment Tag
• It is use to alignment of the text.
– Left alignment <align=“left”>
– Right alignment <align=“right”>
– Center alignment
<align=“center”>
Hyperlink Tag
• A hyperlink is a reference (an address) to a resource on
the web.
• Hyperlinks can point to any resource on the web: an
HTML page, an image, a sound file, a movie, etc.
• The HTML anchor element <a>, is used to define both
hyperlinks and anchors.
<a href="url">Link text</a>
• The href attribute defines the link address.
<a href="http://www.superior.edu.pk">Visit Superior
Site</a>
Result of Hyperlink Code
Image Tag
• To display an image on a page, you need to use
the src attribute.
• src stands for "source". The value of the src
attribute is the URL of the image you want to
display on your page.
• It is a empty tag.
<IMG SRC ="url">
<IMG SRC="picture.gif“>
<IMG SRC="picture.gif“ HEIGHT="30"
WIDTH="50" alt>
Image attributes - <img> tag
<img>
<Src>
<Alt>
<Width>
<Height>
<Border>
<Hspace>
<Vspace>
<Align>
<background>
Defines an image
display an image on a page,Src stands
for "source".
Define "alternate text" for an image
Defines the width of the image
Defines the height of the image
Defines border of the image
Horizontal space of the image
Vertical space of the image
Align an image within the text
Add a background image to an HTML
page
Code & Result of the Image
<html><body>
<p><img
src="file:///C:/WINDOWS/Zapot
ec.bmp" align="left" width="48"
height="48"> </p>
<p><img src
="file:///C:/WINDOWS/
Zapotec.bmp" align="right"
width="48" height="48"></p>
</body></html>
<HTML>
<<body
background="file:///C:/WINDOW
S/Soap
%20Bubbles.bmp" text="white">
<br><br><br>
<h2> Background Image!</h2>
</BODY></HTML>
Code & Result of the Image
<html><body>
<p>An image
<img src="file:///C:/WINDOWS/Zapotec.bmp"
align="bottom" width="48" height="48"> in the
text</p>
<p>An image
<img src ="file:///C:/WINDOWS/Zapotec.bmp"
align="middle" width="48" height="48"> in the
text</p>
<p>An image
<img src ="file:///C:/WINDOWS/Zapotec.bmp"
align="top" width="48" height="48"> in the
text</p>
<p>Note that bottom alignment is the default
alignment</p>
<p><img src
="file:///C:/WINDOWS/Zapotec.bmp"
width="48" height="48">
An image before the text</p>
<p>An image after the text
<img src
="file:///C:/WINDOWS/Zapotec.bmp"
width="48" height="48"> </p>
</body></html>
Code &Result of the Image
<html><body>
<p><img src="file:///C:/WINDOWS/Zapotec.bmp"
align="bottom" width="20" height="20"> </p>
<p><img src ="file:///C:/WINDOWS/Zapotec.bmp"
align="middle" width="40" height="40"></p>
<p><img src ="2.jpg"
align="top" width="60" height="60"></p>
<p><img src ="file:///C:/WINDOWS/Zapotec.bmp"
width="80" height="80"> </p>
<p><img src ="file:///C:/WINDOWS/Zapotec.bmp"
width="100" height="100"> </p>
</body></html>
HTML Table Tag
<table>
<tr>
<td>
<th>
<Caption>
<colgroup>
<col>
<thead>
<tbody>
<tfoot>
<Cellspacing>
<Cellpadding>
<Colspan>
<rowspan>
<Border>
used to create table
table is divided into rows
each row is divided into data cells
Headings in a table
caption to the table
Defines groups of table columns
Defines the attribute values for one or
more columns in a table
Defines a table head
Defines a table body
Defines a table footer
amount of space
between table cells.
space around the edges of each cell
No of column working with will span
No of rows working with will span
attribute takes a number
Code & Result of the Table
<html><body>
<h3>Table without
border</h3>
<table>
<tr> <td>MILK</td>
<td>TEA</td>
<td>COFFEE</td> </tr>
<tr> <td>400</td>
<td>500</td>
<td>600</td> </tr>
</table>
</body></html>
Header
<html><body>
<h4>Horizontal Header:</h4>
<table border="1">
<tr> <th>Name</th>
<th>Loan No</th>
<th>Amount</th> </tr>
<tr> <td>Jones</td>
<td>L-1</td>
<td>5000</td></tr> </table><br><br>
<h4>Vertical Header:</h4>
<table border="5">
<tr> <th>Name</th>
<td>Jones</td> </tr>
<tr> <th>Loan No</th>
<td>L-1</td> </tr>
<tr> <th>Amount</th>
<td>5000</td></tr> </table>
</body></html>
Table Code with Col span & Row span
<html><body>
<h4>Cell that spans two columns:</h4>
<table border="4">
<tr> <th>Name</th>
<th colspan="2">Loan No</th> </tr>
<tr> <td>Jones</td>
<td>L-1</td>
<td>L-2</td> </tr> </table>
<h4>Cell that spans two rows:</h4>
<table border="8">
<tr> <th>Name</th>
<td>Jones</td></tr><tr>
<th rowspan="2">Loan No</th>
<td>L-1</td></tr><tr>
<td>L-2</td></tr></table>
</body></html>
Table Code with Caption & Col Spacing
<html>
<body>
<table border="1">
<caption>My Caption</caption>
<tr>
<td>Milk</td>
<td>Tea</td>
</tr>
<tr>
<td></td>
<td>Coffee</td>
</tr>
</table>
</body>
</html>
Cellpadding,Image &
Backcolor Code
<html><body>
<h3>Without cellpadding:</h3>
<table border="2" bgcolor="green">
<tr> <td>Jones</td>
<td>Smith</td></tr>
<tr> <td>Hayes</td>
<td>Jackson</td></tr></table>
<h4>With cellpadding:</h4>
<table border="8"
cellpadding="10" background="file:///C:/WINDOWS/
FeatherTexture.bmp">
<tr> <td>Jones</td>
<td>Smith</td></tr>
<tr> <td>Hayes</td>
<td>Jackson</td></tr></table>
</body></html>
HTML List Tag
• Lists provide methods to show item or element
sequences in document content. There are
three main types of lists:->
– Unordered lists:-unordered lists are bulleted.
– Ordered lists:- Ordered lists are numbered.
– Definition lists:- Used to create a definition
list
.
List Tags
<LI>
<OL>
<UL>
<DL>
<DT>
<DD>
<LI> is an empty tag,it is used for
representing the list items
Ordered list
Unordered list
Defines a definition list
Defines a term (an item) in a definition
list
Defines a description of a term in a
definition list
Unordered List
• TYPE attribute to the <UL> tag to show
different bullets like:-
– Disc
– Circle
– Square
<ul Type =“disc”>…..</ul>
• The attribute TYPE can also be used
with
<LI> element.
Code & Result of the Unordered List
<html><body>
<h4>Disc bullets list:</h4>
<ul type="disc"> <li>Jones</li>
<li>Smith</li>
<li>Hayes</li>
<li>Jackson</li></ul>
<h4>Circle bullets list:</h4>
<ul type="circle">
<li>Jones</li>
<li>Simth</li>
<li>Hayes</li>
<li>Jackson</li></ul>
<h4>Square bullets list:</h4>
<ul type="square">
<li>Jones</li>
<li>Smith</li>
<li>Hayes</li>
<li>Jackson</li></ul>
</body></html>
Ordered List
• The TYPE attribute has the following value like:-
– TYPE = "1" (Arabic numbers)
– TYPE = "a" (Lowercase alphanumeric)
– TYPE = "A" (Uppercase alphanumeric)
– TYPE = "i" (Lowercase Roman numbers)
– TYPE = "I" (Uppercase Roman numbers)
• By default Arabic numbers are used
List
<html><body>
<h4>Numbered list:</h4>
<ol> <li>Jones</li>
<li>Smith</li>
<li>Hayes</li>
<li>Jackson</li></ol>
<h4>Letters list:</h4>
<ol type="A"> <li>Jones</li>
<li>Smith</li>
<li>Hayes</li>
<li>Jackson</li></ol>
<h4>Roman numbers list:</h4>
<ol type="I"> <li>Jones</li>
<li>Smith</li>
<li>Hayes</li>
<li>Jackson</li></ol>
</body></html>
HTML Form
• A form is an area that can contain
form elements.
• Form elements are elements that allow
the user to enter information in a form.
like text
– fields, textarea fields, drop-down
menus, radio buttons and
checkboxes etc
• A form is defined with the <form> tag.
• The syntax:-
– <form>
– input elements
Form Tags
<form>
<input>
<text>
<textarea>
<password>
<label>
<option>
<select>
<button>
<value>
<checkbox>
<dropdown box>
Defines a form for user input
used to create an input field
Creates a single line text
entry field
Defines a text-area (a multi-line text input control)
Creates a single line text entry field. And the
characters entered are shown as asterisks (*)
Defines a label to a control
Creates a Radio Button.
Defines a selectable list (a drop-down box)
Defines a push button
attribute of the option element.
select or unselect a checkbox
A drop-down box is a
selectable list
Code of the HTML Form
<input type="button">
•<input type="checkbox">
•<input type="color">
•<input type="date">
•<input type="datetime-local">
•<input type="email">
•<input type="file">
•<input type="hidden">
•<input type="image">
•<input type="month">
•<input type="number">
•<input type="password">
•<input type="radio">
•<input type="range">
•<input type="reset">
•<input type="search">
•<input type="submit">
•<input type="tel">
•<input type="text">
•<input type="time">
•<input type="url">
Code of the HTML Form
<html><body><form>
<h1>Create a Internet Mail Account</h1>
<p>First Name <input type="text" name="T1" size="30"></p>
<p>Last Name <input type="text" name="T2" size="30"></p>
<p> Login Email <input type="text" name="T3" size="20"> @mail.com</p>
<p>Password <input type="password" name="T4" size="20"></p>
<input type="radio" checked="checked" name="sex" value="male" /> Male</br>
<input type="radio" name="sex" value="female" /> Female
<p>Birthday <input type="text" name="T6" size="05">
<select size="1" name="D2">
<option>-Select One-</option>
<option>January</option>
<option>February</option>
<option>March</option> </select>
<input type="text" name="T7" size="10"></p> TypeYourself<textarea rows="4" name="S1"
cols="20"></textarea>
Result of the Form Code
Any Question

HTML Basic Concepts or Introduction of HTML

  • 1.
    Subject : Web applicationDevelopment Instructor: Muhammad Jameel
  • 2.
    Assessments  Quiz’s (10) •Total 4 Quiz’s  Assignments(10) • Total 4 Assignments  Mid Term (20)  Final Term (35)  Project (25) Proposal +Project +Documents
  • 3.
    INTRODUCTION TO HTML With HTML you can create your own Web site.  HTML stands for Hyper Text Markup Language.  HTML is derived from a language SGML (Standard Graphics Markup Language).  The future of HTML is XML (eXtended 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 is not case sensitive language.  HTML documents contain HTML tags and plain text.
  • 4.
    HTML Elements andTags • A tag is always enclosed in angle bracket <>like <HTML> • HTML tags normally come in pairs like <HTML> and </HTML> i.e. Start tag = <HTML> End tag =</HTML> • Start and end tags are also called opening tags and closing tags
  • 5.
    HOW TO START •Write html code in notepad , Notepad++, Sublime, Dream Viewer, Visual Studio ,Atom and etc. • Save the file with (.Html)/(.Htm) extension. • View the page in any web browser viz. INTERNET EXPLORER, NETSCAPE NAVIGATOR etc. • The purpose of a web browser (like internet explorer or firefox) is to read html documents and display them as web pages.
  • 6.
    Code With HTML <HTML> <HEAD> <TITLE> MYFIRST PAGE </TITLE> </HEAD> <BODY> Web Application Development </BODY> </HTML> Web Application Development
  • 7.
    Explain these tags •<HTML> - Describe HTML web page that is to be viewed by a web browser. • <HEAD> - This defines the header section of the page. • <TITLE> - This shows a caption in the title bar of the page. • <BODY> - This tag show contents of the web page will be displayed.
  • 8.
    Types of HTMLTags There are two different types of tags:-> Container Element:-> Container Tags contains start tag & end tag i.e. <HTML>… </HTML> Empty Element:-> Empty Tags contains start tag i.e. <BR>
  • 9.
    Text Formatting Tags HeadingElement:-> • There are six heading elements (<H1>,<H2>,<H3>,<H4>, <H5>,<H6>). • All the six heading elements are container tag and requires a closing tag. • <h1> will print the largest heading • <h6> will print the smallest heading
  • 10.
    Heading Tag Code <html> <head><title>heading</title></head> <body> <h1>WEB APPLICATION DEVELOPMENT</h1> <h2> WEB APPLICATION DEVELOPMENT </h2> <h3> WEB APPLICATION DEVELOPMENT </h3> <h4> WEB APPLICATION DEVELOPMENT </h4> <h5> WEB APPLICATION DEVELOPMENT </h5> <h6> WEB APPLICATION DEVELOPMENT </h6> </body>
  • 11.
  • 12.
    HTML Paragraph Tag •HTML documents are divided into paragraphs. • Paragraphs are defined with the <p> tag i.e. <p>This is a paragraph</p> <p>This is another paragraph</p> <pre>This text is preformatted</pre>
  • 13.
    Line Break& HorizontalLine Tag • if you want a line break or a new line without starting a new paragraph Use the <br> tag. • Defines a horizontal line use <hr>tag. • <br> <hr> element are empty HTML element i.e. <hr> <br> Channel
  • 14.
    Text Formatting Tags <b> <big> <em> <i> <small> <strong> <sub> <super> <ins> <del> <tt> <u> <strike> Definesbold text Defines big text Defines emphasized text Defines italic text Defines small text Defines strong text Defines subscripted text Defines superscripted text Defines inserted text Defines deleted text Defines teletype text Defines underline text Defines strike text
  • 15.
    Text Formatting Code <html> <head></head> <body> <b>Thistext is Bold</b> <br><em>This text is Emphasized</em> <br><i>This text is Italic</i> <br><small>This text is Small</small> <br>This is<sub> Subscript</sub> and <sup>Superscript</sup> <br><strong>This text is Strong</strong> <br><big>This text is Big</big> <br><u>This text is Underline</u> <br><strike>This text is Strike</strike> <br><tt>This text is Teletype</tt> </body> </html>
  • 16.
    Result of TextFormatting Code
  • 17.
    Font Tag • Thiselement is used to format the size, typeface and color of the enclosed text. • The commonly used fonts for web pages are Arial, Comic Sans MS , Lucida Sans Unicode, Arial Black, Courier New, Times New Roman, Arial Narrow, Impact, Verdana. • The size attribute in font tag takes values from 1 to 7.
  • 18.
    Font Tag Code <html> <head><title>fonts</title></head> <body> <br><font color=“green" size="7" face="Arial"> WEB APPLICATION DEVELOPMENT </font> <br><font color=“green" size="6" face="Comic Sans MS "> WEB APPLICATION DEVELOPMENT </font> <br><font color=“green" size="5" face="Lucida Sans Unicode"> MCS-4C 2ND SEMESTER </font> <br><font color=“green" size="4" face="Courier New">SUPERIOR UNIVERSITY GOLD CAMPUS, LAHORE </font> <br><font color=“green" size="3" face="Times New Roman"> WEB APPLICATION DEVELOPMENT </font> <br><font color=“green" size="2" face="Arial Black"> WEB APPLICATION DEVELOPMENT </font> <br><font color=“green" size="1" face="Impact"> WEB APPLICATION DEVELOPMENT </font> </body> </html>
  • 19.
  • 20.
    Background & TextColor Tag • The attribute bgcolor is used for changing the back ground color of the page. <body bgcolor=“Green” > • Text is use to change the color of the enclosed text. <body text=“White”>
  • 21.
    Text Alignment Tag •It is use to alignment of the text. – Left alignment <align=“left”> – Right alignment <align=“right”> – Center alignment <align=“center”>
  • 22.
    Hyperlink Tag • Ahyperlink is a reference (an address) to a resource on the web. • Hyperlinks can point to any resource on the web: an HTML page, an image, a sound file, a movie, etc. • The HTML anchor element <a>, is used to define both hyperlinks and anchors. <a href="url">Link text</a> • The href attribute defines the link address. <a href="http://www.superior.edu.pk">Visit Superior Site</a>
  • 23.
  • 24.
    Image Tag • Todisplay an image on a page, you need to use the src attribute. • src stands for "source". The value of the src attribute is the URL of the image you want to display on your page. • It is a empty tag. <IMG SRC ="url"> <IMG SRC="picture.gif“> <IMG SRC="picture.gif“ HEIGHT="30" WIDTH="50" alt>
  • 25.
    Image attributes -<img> tag <img> <Src> <Alt> <Width> <Height> <Border> <Hspace> <Vspace> <Align> <background> Defines an image display an image on a page,Src stands for "source". Define "alternate text" for an image Defines the width of the image Defines the height of the image Defines border of the image Horizontal space of the image Vertical space of the image Align an image within the text Add a background image to an HTML page
  • 26.
    Code & Resultof the Image <html><body> <p><img src="file:///C:/WINDOWS/Zapot ec.bmp" align="left" width="48" height="48"> </p> <p><img src ="file:///C:/WINDOWS/ Zapotec.bmp" align="right" width="48" height="48"></p> </body></html> <HTML> <<body background="file:///C:/WINDOW S/Soap %20Bubbles.bmp" text="white"> <br><br><br> <h2> Background Image!</h2> </BODY></HTML>
  • 27.
    Code & Resultof the Image <html><body> <p>An image <img src="file:///C:/WINDOWS/Zapotec.bmp" align="bottom" width="48" height="48"> in the text</p> <p>An image <img src ="file:///C:/WINDOWS/Zapotec.bmp" align="middle" width="48" height="48"> in the text</p> <p>An image <img src ="file:///C:/WINDOWS/Zapotec.bmp" align="top" width="48" height="48"> in the text</p> <p>Note that bottom alignment is the default alignment</p> <p><img src ="file:///C:/WINDOWS/Zapotec.bmp" width="48" height="48"> An image before the text</p> <p>An image after the text <img src ="file:///C:/WINDOWS/Zapotec.bmp" width="48" height="48"> </p> </body></html>
  • 28.
    Code &Result ofthe Image <html><body> <p><img src="file:///C:/WINDOWS/Zapotec.bmp" align="bottom" width="20" height="20"> </p> <p><img src ="file:///C:/WINDOWS/Zapotec.bmp" align="middle" width="40" height="40"></p> <p><img src ="2.jpg" align="top" width="60" height="60"></p> <p><img src ="file:///C:/WINDOWS/Zapotec.bmp" width="80" height="80"> </p> <p><img src ="file:///C:/WINDOWS/Zapotec.bmp" width="100" height="100"> </p> </body></html>
  • 29.
    HTML Table Tag <table> <tr> <td> <th> <Caption> <colgroup> <col> <thead> <tbody> <tfoot> <Cellspacing> <Cellpadding> <Colspan> <rowspan> <Border> usedto create table table is divided into rows each row is divided into data cells Headings in a table caption to the table Defines groups of table columns Defines the attribute values for one or more columns in a table Defines a table head Defines a table body Defines a table footer amount of space between table cells. space around the edges of each cell No of column working with will span No of rows working with will span attribute takes a number
  • 30.
    Code & Resultof the Table <html><body> <h3>Table without border</h3> <table> <tr> <td>MILK</td> <td>TEA</td> <td>COFFEE</td> </tr> <tr> <td>400</td> <td>500</td> <td>600</td> </tr> </table> </body></html>
  • 31.
    Header <html><body> <h4>Horizontal Header:</h4> <table border="1"> <tr><th>Name</th> <th>Loan No</th> <th>Amount</th> </tr> <tr> <td>Jones</td> <td>L-1</td> <td>5000</td></tr> </table><br><br> <h4>Vertical Header:</h4> <table border="5"> <tr> <th>Name</th> <td>Jones</td> </tr> <tr> <th>Loan No</th> <td>L-1</td> </tr> <tr> <th>Amount</th> <td>5000</td></tr> </table> </body></html>
  • 32.
    Table Code withCol span & Row span <html><body> <h4>Cell that spans two columns:</h4> <table border="4"> <tr> <th>Name</th> <th colspan="2">Loan No</th> </tr> <tr> <td>Jones</td> <td>L-1</td> <td>L-2</td> </tr> </table> <h4>Cell that spans two rows:</h4> <table border="8"> <tr> <th>Name</th> <td>Jones</td></tr><tr> <th rowspan="2">Loan No</th> <td>L-1</td></tr><tr> <td>L-2</td></tr></table> </body></html>
  • 33.
    Table Code withCaption & Col Spacing <html> <body> <table border="1"> <caption>My Caption</caption> <tr> <td>Milk</td> <td>Tea</td> </tr> <tr> <td></td> <td>Coffee</td> </tr> </table> </body> </html>
  • 34.
    Cellpadding,Image & Backcolor Code <html><body> <h3>Withoutcellpadding:</h3> <table border="2" bgcolor="green"> <tr> <td>Jones</td> <td>Smith</td></tr> <tr> <td>Hayes</td> <td>Jackson</td></tr></table> <h4>With cellpadding:</h4> <table border="8" cellpadding="10" background="file:///C:/WINDOWS/ FeatherTexture.bmp"> <tr> <td>Jones</td> <td>Smith</td></tr> <tr> <td>Hayes</td> <td>Jackson</td></tr></table> </body></html>
  • 35.
    HTML List Tag •Lists provide methods to show item or element sequences in document content. There are three main types of lists:-> – Unordered lists:-unordered lists are bulleted. – Ordered lists:- Ordered lists are numbered. – Definition lists:- Used to create a definition list .
  • 36.
    List Tags <LI> <OL> <UL> <DL> <DT> <DD> <LI> isan empty tag,it is used for representing the list items Ordered list Unordered list Defines a definition list Defines a term (an item) in a definition list Defines a description of a term in a definition list
  • 37.
    Unordered List • TYPEattribute to the <UL> tag to show different bullets like:- – Disc – Circle – Square <ul Type =“disc”>…..</ul> • The attribute TYPE can also be used with <LI> element.
  • 38.
    Code & Resultof the Unordered List <html><body> <h4>Disc bullets list:</h4> <ul type="disc"> <li>Jones</li> <li>Smith</li> <li>Hayes</li> <li>Jackson</li></ul> <h4>Circle bullets list:</h4> <ul type="circle"> <li>Jones</li> <li>Simth</li> <li>Hayes</li> <li>Jackson</li></ul> <h4>Square bullets list:</h4> <ul type="square"> <li>Jones</li> <li>Smith</li> <li>Hayes</li> <li>Jackson</li></ul> </body></html>
  • 39.
    Ordered List • TheTYPE attribute has the following value like:- – TYPE = "1" (Arabic numbers) – TYPE = "a" (Lowercase alphanumeric) – TYPE = "A" (Uppercase alphanumeric) – TYPE = "i" (Lowercase Roman numbers) – TYPE = "I" (Uppercase Roman numbers) • By default Arabic numbers are used
  • 40.
    List <html><body> <h4>Numbered list:</h4> <ol> <li>Jones</li> <li>Smith</li> <li>Hayes</li> <li>Jackson</li></ol> <h4>Letterslist:</h4> <ol type="A"> <li>Jones</li> <li>Smith</li> <li>Hayes</li> <li>Jackson</li></ol> <h4>Roman numbers list:</h4> <ol type="I"> <li>Jones</li> <li>Smith</li> <li>Hayes</li> <li>Jackson</li></ol> </body></html>
  • 41.
    HTML Form • Aform is an area that can contain form elements. • Form elements are elements that allow the user to enter information in a form. like text – fields, textarea fields, drop-down menus, radio buttons and checkboxes etc • A form is defined with the <form> tag. • The syntax:- – <form> – input elements
  • 42.
    Form Tags <form> <input> <text> <textarea> <password> <label> <option> <select> <button> <value> <checkbox> <dropdown box> Definesa form for user input used to create an input field Creates a single line text entry field Defines a text-area (a multi-line text input control) Creates a single line text entry field. And the characters entered are shown as asterisks (*) Defines a label to a control Creates a Radio Button. Defines a selectable list (a drop-down box) Defines a push button attribute of the option element. select or unselect a checkbox A drop-down box is a selectable list
  • 43.
    Code of theHTML Form <input type="button"> •<input type="checkbox"> •<input type="color"> •<input type="date"> •<input type="datetime-local"> •<input type="email"> •<input type="file"> •<input type="hidden"> •<input type="image"> •<input type="month"> •<input type="number"> •<input type="password"> •<input type="radio"> •<input type="range"> •<input type="reset"> •<input type="search"> •<input type="submit"> •<input type="tel"> •<input type="text"> •<input type="time"> •<input type="url">
  • 44.
    Code of theHTML Form <html><body><form> <h1>Create a Internet Mail Account</h1> <p>First Name <input type="text" name="T1" size="30"></p> <p>Last Name <input type="text" name="T2" size="30"></p> <p> Login Email <input type="text" name="T3" size="20"> @mail.com</p> <p>Password <input type="password" name="T4" size="20"></p> <input type="radio" checked="checked" name="sex" value="male" /> Male</br> <input type="radio" name="sex" value="female" /> Female <p>Birthday <input type="text" name="T6" size="05"> <select size="1" name="D2"> <option>-Select One-</option> <option>January</option> <option>February</option> <option>March</option> </select> <input type="text" name="T7" size="10"></p> TypeYourself<textarea rows="4" name="S1" cols="20"></textarea>
  • 45.
    Result of theForm Code
  • 46.