SlideShare a Scribd company logo
HTML
What is HTML?
• HTML stands for Hyper Text Markup Language .
• It is used to design and develop Web Pages.
• HTML is
– A Simple mark up language (NOT a programming language)
– Browser/Platform Independent (plain ASCII text format)
– Not Case Sensitive
– HTML is Interpreted by browser (NOT compiled).
– A medium for User Interface (GUI)
HTML Tags
• The HTML instructions are called tags, and look like
<TAG> ….. Text here…….. </TAG>
• Tags are used for data presentation
• There are two types of tags
1. Container tags : Tags that have starting as well as ending part.
e.g. <TITLE> Title of the Web Page </TITLE>
2. Empty tags : Tags that do not have the closing part.
e.g. <BR> , <HR>
HTML Elements and attributes
• HTML elements = (HTML instructions + text to which the instructions apply)
• An attribute is an additional feature you can use to configure the element,
Attributes are optional.
<H1 ALIGN = ‚CENTER‛> This is a heading </H1>
Example
<H1 ALIGN = ‚CENTER‛> This is a heading </H1>
Example
Starting Tag
<H1 ALIGN = ‚CENTER‛> This is a heading </H1>
Example
End Tag
<H1 ALIGN = ‚CENTER‛> This is a heading </H1>
Example
Attributes
<H1 ALIGN = ‚CENTER‛> This is a heading </H1>
Example
HTML element
HTML Document Structure
• An HTML file can be created by using a simple text editor viz notepad, text
pad, Eclipse IDE editor
• HTML file must have an extension htm or html.
<HTML>
<HEAD>
<TITLE>Title of the Web Page </TITLE>
</HEAD>
<BODY>
<H1> Contents </H1>
</BODY>
</HTML>
HTML Document - Head
• Enclosed in <HEAD> </HEAD> tag
• Tags that can go in the document head
– <TITLE> : Indicates the title of the document that is used as the
window caption
– <STYLE > : To Include CSS (Cascading Style Sheet)
– <LINK rel=‚stylesheet‛ type=‚text/css‛ href=‚file path‛> : specifies the
relationship between the current document and other documents.
– <SCRIPT type=‚text/javascript‛> : specifies the client side script name
which used to perform the client side validation.
11
HTML Document - Head
• <meta> tag provides metadata about the HTML document. Metadata
will not be displayed on the page, but will be machine parsable.
• Meta elements are typically used to specify page description, keywords,
author of the document, last modified, and other metadata.
• The metadata can be used by browsers (how to display content or
reload page), search engines (keywords), or other web services.
<meta name="description" content="Free Web tutorials">
<meta charset="UTF-8">
HTML Document - Head
<HTML>
<HEAD>
<TITLE>Title of the Web Page </TITLE>
<STYLE > </style>
<LINK rel=“stylesheet” type=“text/css” href=“file path”>
<SCRIPT type=“text/javascript”>
<meta name="description" content="Free Web tutorials">
</HEAD>
<BODY>
<H1> Contents </H1>
</BODY>
</HTML>
HTML Document – Body
• Enclosed in <BODY> </BODY> tag.
• Some important attributes of the BODY tag
– BGCOLOR = ‚color‛ / ‚#rrggbb‛
– BACKGROUND = ‚url of the image‛
– TEXT = ‚color‛ / ‚#rrggbb‛
– LINK = ‚color‛ / ‚#rrggbb‛
– ALINK = ‚color‛ / ‚#rrggbb‛
– VLINK = ‚color‛ / ‚#rrggbb‛
• Colors are defined using a hexadecimal notation for the combination of
Red, Green, and Blue color values (RGB).
14
Try Out
• Create an html page and name it first.html using the text editor
present in your system. The html page should have a text message
‚Welcome to HTML‛ .
Try Out
• In the body of first.html try out the various attributes mentioned
below:
<body BGCOLOR="RED" BACKGROUND="Chrysanthemum.jpg" TEXT =
"#000000" LINK = "#FFFF00" ALINK = "RED" VLINK = "WHITE‚>
DOM Structure
• The usual parent/child relationship between node
• Like any other tree, you can walk this
Formatting the web page
<FONT>
• Allows you to specify the font face and font size and other fond styling's.
– Some common attributes are
• FACE : specifies the font type.
– Defaults fonts like ‚Arial‛, ‚Times New Roman‛, and ‚Courier‛ are
available in all Systems.
• SIZE : specifies the font size.
– Value can range from 1 to 7. The default is 3.
– SIZE can be set as a relative value using + or – .
• COLOR : specifies the color
– The color of a font can be specified using a hexadecimal number value
six characters long.
<FONT FACE=“Arial” SIZE=“7” COLOR=“#FF0000”> The Written Word </FONT>
Text Formatting tags
• Paragraphs
<P> </P> - used to create paragraphs.
• Line Breaks
<BR> - to insert returns or blank lines in the document.
e.g. : <P>This <BR> is a para<BR>graph with line breaks</P>
• Horizontal Lines
<HR> - used to draw a horizontal line across the web page.
E.g: <HR ALIGN = ‚right‛ WIDTH = ‚50%‛>
• Comments in HTML
<!-- Content here -->
Text Formatting tags
• Header Tags
– HTML has six level of headings.
– Displayed in larger and bolder fonts.
– Different level heading tags
<H1> Heading 1 </H1>
<H2> Heading 2 </H2>
<H3> Heading 3 </H3>
<H4> Heading 4 </H4>
<H5> Heading 5 </H5>
<H6> Heading 6 </H6>
• The font size of the heading will go on decreasing from H1 to H6.
Text Formatting tags
• <B>….</B> - Bold
• <I>……</I> - Italic
• <U>….</U> - Underline
• <STRIKE>…</STRIKE> - Strikethrough
• <CENTER></CENTER> - Centers the text on the screen.
• <SUB>….</SUB> - Subscript
• <SUP>….</SUP> - Superscript
22
Try Out
• Modify first.html with following features
– Add 3 headings with paragraphs underneath to each
– Each paragrapshs and heading should be of different color
– Each heading should be italic
– Each subheading should be italic, bold and underlined
Lists in HTML
Lists in HTML
• There are three types of lists in HTML
– Ordered List
– Unordered List
– Description List
Lists in HTML
• Un Ordered list
<ul>
<li> baabtra</li>
<li> baabte</li>
</ul>
Out Put
• Baabtra
• baabte
Lists in HTML
• Ordered list
<ol>
<li>Projects</li>
<li>Products</li>
<li>Services</li>
</ol>
Out Put
1. Projects
2. Products
3. Services
Lists in HTML
• Description list
<dl>
<dt> baabte</dt>
<dd> - Parent company</dd>
<dt> baabte</dt>
<dd> - Training division</dd>
</dl>
Out Put
baabte
- Parent company
Baabte
- Training division
Inline and Block-Level Elements
• Elements inside the <BODY> tag are classified as
– block-level elements and
–Block-level elements usually begin on a new line. Generally, block-
level elements may contain inline elements and other block-level
elements
–Eg :<H1><P><HR>
– Inline elements.
–Inline elements usually stay on the same line
–Eg: <FONT><I><BOLD>
29
Linking Pages
• Used to link text with other documents
• <A></A>
– HREF
– NAME (bookmarks inside the page)
– TITLE (balloon help in IE)
– TARGET (Define where the linked document will be opened)
e.g.: <A href=‚next.html‛> Click here </A>
• Used to link text with same documents (called bookmarking)
30
<BODY link=“blue” alink=“green” vlink=“red”>
<A name=“top”> Top of the Page </A>
……………………………………………………
<A href=“#top”>Top</A> </BODY>
Absolute and Relative Link
• You can reference a document within an HREF attribute in Two ways.
Absolutely or relatively.
• An absolute link is created when the href value is a fully qualified URL.
• Eg: <A HREF = ‚www.google.com"> Google</A>
• <A HREF=‚C:/html/project/index.html‛>HTML project</A>
• A relative link is created when the destination href value is relative to the
location of the current webpage
• <A HREF = ‚../jsp/display.jsp‛> Display details</A>
• <A HREF=‚../project/index.html‛>HTML project</A>
• Using relative links allows the web site to remain intact even if the site is
moved to another server.
Tables
• Displays data in a tabular format so as helps to positioning the contents of the
page in a more structured way
• <TABLE> ….. </TABLE>
• Some attributes
• ALIGN = LEFT | RIGHT | CENTER
• BORDER = n (Number of Pixels )
• BGCOLOR = ‚color‛ | ‚#rrggbb‛
• WIDTH = % Of Parent | n (pixels)
• CELLSPACING = n (Number of Pixels ) -Specifies the space between the cell wall
and contents
• CELLPADDING = n(Number of Pixels )- Specifies the space between cell
Tables
<TABLE BORDER=1>
<TR>
<TH> first header cell contents </TH>
<TH> last header cell contents </TH>
</TR>
<TR>
<TD> first row, first cell contents </TD>
<TD> first row, last cell contents </TD>
</TR>
<TR>
<TD> last row, first cell contents </TD>
<TD> last row, last cell contents </TD>
</TR>
</TABLE>
<h2> Account details</h2>
<TABLE BORDER="1" CELLSPACING="10" CELLPADDING="1" WIDTH=‚100%">
<TR>
<TH>AccountNo</TH><TH>Customer Name</TH>
</TR>
<TR>
<TD>1001</TD><TD>Jack</TD>
</TR>
<TR>
<TD>1002</TD><TD>Tom</TD>
</TR>
</TABLE>
Creating tables 1
34
Creating tables 2
<TABLE BORDER=2 BGCOLOR="#B45F04">
<TR ALIGN="CENTER">
<TD COLSPAN=3>MINI STATEMENT</TD>
</TR>
<TR ALIGN="CENTER‚>
<TH>Account ID</TH>
<TH>Date</TH>
<TH>Amount</TH>
</TR>
<TR> <TD>54576989</TD>
<TD>12-Jan-2009</TD>
<TD>3000.00</TD>
</TR>
<TR>
<TD>56783297</TD>
<TD>27-Feb-2009</TD>
<TD>500.00</TD>
</TR>
</TABLE>
Iframe
• An iframe is used to display a web page within a web page.
<iframe src=‚baabtra.html" width="200" height="200"></iframe>
Some characters like the < character, have a special meaning in HTML, and
therefore cannot be used in the text. The most common character entities:
HTML Character Entities
Result Description Entity Name
<
>
&
‚
‘
non-breaking space
less than
greater than
ampersand
quotation mark
apostrophe
&nbsp;
&lt;
&gt;
&amp;
&quot;
&apos;
HTML Character Entities - DEMO
<html>
<head>
<title>Entity example</title>
</head>
<body bgcolor="cyan">
<h1>HTML</h1>
<!-- without using Entities -->
<h3>All html source code stars with <HTML> Tag</h3>
<!-- using Entities to dispaly <HTML> -->
<h3>All html source code stars with &lt;HTML&gt; Tag</h3>
&copy; &nbsp;&nbsp;XYZ &reg;&nbsp;
</body>
</html>
Forms
• Used for creating Graphical User Interface (GUI)
• In a web application client interact through GUI.
• FORM by itself really cannot do anything
• Forms become powerful when connected to a server application
• A single HTML page can have multiple forms.
Forms
• Can be designed using <FORM></FORM> tag
<FORM NAME=‚form1‛ ACTION="abc.jsp" METHOD=GET>
</FORM>
(form elements go here)
Forms
• Can be designed using <FORM></FORM> tag
<FORM NAME=‚form1‛ ACTION="abc.jsp" METHOD=GET>
</FORM>
(form elements go here)
is used for future
manipulation of
data by scripting
language
Forms
• Can be designed using <FORM></FORM> tag
<FORM NAME=‚form1‛ ACTION="abc.jsp" METHOD=GET>
</FORM>
(form elements go here)
indicates a program
on the server that
will be executed
when this form is
submitted. Mostly it
will be an ASP or a
JSP script.
Forms
• Can be designed using <FORM></FORM> tag
<FORM NAME=‚form1‛ ACTION="abc.jsp" METHOD=GET>
</FORM>
(form elements go here)
indicates the way the
form is submitted to
the server - popular
options are
GET/POST
Form elements
• <INPUT> tag is used to add elements to the form
• NAME = ‚controlname‛
• TYPE = text / password / checkbox / radio/ submit / reset /button / hidden /
file
• VALUE
• MAXLENGTH
• SIZE
• All elements should be named by setting a unique value to the name
attribute.
• The value attribute is used to set a default value for the control.
Text Box/Password
• A text field can be added to the form by typing
– <INPUT TYPE=‚TEXT" NAME=‚txtcompany" VALUE=‛XYZ‛ SIZE="10" MAXLENGTH="15">
• A password field can be added to the form by typing
– <INPUT TYPE=‚PASSWORD‛ NAME=‚pwdLogin‛ SIZE=‚50‛ MAXLENGTH=‚12‛>
– when the text is entered, stars appear instead of the typed letters
• Attributes are
– VALUE : is the default value loaded
– SIZE
– MAXLENGTH : specifies max number of characters that can be entered to the
control
Text Area
• Multiline text input
– <TEXTAREA NAME=‚feedback‛ ROWS=‚3‛ COLS=‚40‛>
Default text goes here
– </TEXTAREA>
• ROWS is the number of rows displayed
• COLS is the no of characters per line
• Default text is optional
• Dose not have VALUE and MAXLENGTH attributes
• The default text is to be put into
<TEXTAREA> </TEXTAREA> tags
List Box ( Drop-down box)
• SIZE : number of lines to display
• VALUE : indicates what will be sent to the server
• SELECTED : sets the default selected item
• MULTIPLE : will allow multiple selection of items
– Eg: <SELECT NAME=‚Hobbies‛ MULTIPLE SIZE=‚3‛>
<SELECT NAME=‚Hobbies‛>
<OPTION VALUE=‚T‛>Travel
<OPTION VALUE=‚R‛ SELECTED>Reading
<OPTION VALUE=‚S‛>Sleeping
<OPTION VALUE=‚W‛>Walking
</SELECT>
Check Box
• <INPUT TYPE="checkbox" NAME=‛contact" VALUE=‚email‛ CHECKED> Notify by email
• Used for multiple selection
• VALUE indicates the value to be transmitted to the server
– e.g: contact=email will be sent to the server
• CHECKED sets the checkbox to be selected by default
• Here ‚Notify by email‛ is visible to the user and the value ‚email‛ is not visible to
the user
48
Buttons
• The Submit button
• Sends the form contents to the server when clicked
• By default only submit button can invoke the action page and send data to server.
• <INPUT TYPE=submit NAME=cmdsubmit VALUE =‚Submit‛>
• The Reset button
• Resets all the form controls to the default state.
• <INPUT TYPE=Reset NAME=cmdReset VALUE="Reset">.
• A button
• No predetermined action like submit or reset.
• Script should be written to make it work. (this will be covered in later chapters)
• <INPUT TYPE=Button NAME=cmdAdd VALUE=‚Click Me">.
Radio Buttons
• Radio buttons with the same NAME are grouped together
• Radio buttons are used for Single selection
• Only one button can be selected in a group
• VALUE data to be sent to the server
• CHECKED will preselect the button
50
<INPUT TYPE="radio" NAME="output" VALUE="screen‚ checked> Screen
<INPUT TYPE="radio" NAME="output" VALUE="printer">Printer
Hidden text field
<INPUT TYPE=‚hidden‛ NAME=‚userinformation‛ VALUE =‚form1‛>
– Not displayed to the user
– Can be used to pass data from one form to another
– Cannot be modified by the user
– So it must have a VALUE attribute set
– VALUE data to be sent to the server
– Mainly used in server side programming
51
52
Form example
• To display the form elements in a visually appealing way, put them into
table cells as shown in the above form.
Form Object
action Reflects the ACTION attribute.
elements An array reflecting all the elements in a form.
length Reflects the number of elements on a form.
method Reflects the METHOD attribute.
reset() Resets a form.
submit() Submits a form.
Properties
Methods
Event and event Handlers
Reset onReset(),
Submit onSubmit()
Text, Textarea, Password, hidden Objects
• Properties
– defaultValue : Reflects the VALUE attribute.
– name : NAME attribute.
– type : Reflects the TYPE attribute.
– value : Reflects the current value of the Text object’s field.
• Methods
– focus() : Gives focus to the object.
– blur() : Removes focus from the object.
– select() : Selects the input area of the object.
• Event Handler
– onBlur : when a form element loses focus
– onChange : field loses focus and its value has been modified.
– onFocus : when a form element receives input focus.
– onSelect : when a user selects some of the text within a text field.
HTML Events
• Click
• Moserover
• Mousemove
• Mousedown
• Mouseup
• Keypress
• Keydown
• Keyup
How to Access username using DOM
<form name=‚userlogin‛>
Username <input type=‚text‛ name=‚username‛>
Password<input type=‚text‛ name=‚pass‛>
</form>
• document object refers the html document.(<body> tag)
• Inside the document we have a form object
• Inside form we have two textboxes
• According to the DOM we can access the value inside the textbox using
JavaScript like
document.userlogin.username.value
• In an form we are accessing elements by name.
• The name should be unique.
57
Try Out
• Create a login screen with a heading Login , two text fields user
name , password and a submit button. Put the UI elements in a
table structure so as to give it good look and feel.
End of day

More Related Content

What's hot

Html
HtmlHtml
HTML (Hyper Text Markup Language) by Mukesh
HTML (Hyper Text Markup Language) by MukeshHTML (Hyper Text Markup Language) by Mukesh
HTML (Hyper Text Markup Language) by Mukesh
Mukesh Kumar
 
Css
CssCss
Css introduction
Css  introductionCss  introduction
Css introduction
vishnu murthy
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
smitha273566
 
Css tutorial
Css tutorialCss tutorial
Css tutorial
vedaste
 
Unit 1wt
Unit 1wtUnit 1wt
Unit 1wt
vamsi krishna
 
Html Basic Tags
Html Basic TagsHtml Basic Tags
Html Basic Tags
Richa Singh
 
Css notes
Css notesCss notes
Html
HtmlHtml
HTML [Basic] --by Abdulla-al Baset
HTML [Basic] --by Abdulla-al BasetHTML [Basic] --by Abdulla-al Baset
HTML [Basic] --by Abdulla-al Baset
Abdulla-al Baset
 
Html4
Html4Html4
CSS Basics part One
CSS Basics part OneCSS Basics part One
CSS Basics part One
M Ashraful Islam Jewel
 
Css
CssCss
HTML - LinkedIn
HTML - LinkedInHTML - LinkedIn
Web development using html 5
Web development using html 5Web development using html 5
Web development using html 5
Anjan Mahanta
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
Joseph Gabriel
 
Unit iv xml dom
Unit iv xml domUnit iv xml dom
Unit iv xml dom
smitha273566
 
Css Complete Notes
Css Complete NotesCss Complete Notes
Css Complete Notes
EPAM Systems
 
Css lecture notes
Css lecture notesCss lecture notes
Css lecture notes
Santhiya Grace
 

What's hot (20)

Html
HtmlHtml
Html
 
HTML (Hyper Text Markup Language) by Mukesh
HTML (Hyper Text Markup Language) by MukeshHTML (Hyper Text Markup Language) by Mukesh
HTML (Hyper Text Markup Language) by Mukesh
 
Css
CssCss
Css
 
Css introduction
Css  introductionCss  introduction
Css introduction
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
Css tutorial
Css tutorialCss tutorial
Css tutorial
 
Unit 1wt
Unit 1wtUnit 1wt
Unit 1wt
 
Html Basic Tags
Html Basic TagsHtml Basic Tags
Html Basic Tags
 
Css notes
Css notesCss notes
Css notes
 
Html
HtmlHtml
Html
 
HTML [Basic] --by Abdulla-al Baset
HTML [Basic] --by Abdulla-al BasetHTML [Basic] --by Abdulla-al Baset
HTML [Basic] --by Abdulla-al Baset
 
Html4
Html4Html4
Html4
 
CSS Basics part One
CSS Basics part OneCSS Basics part One
CSS Basics part One
 
Css
CssCss
Css
 
HTML - LinkedIn
HTML - LinkedInHTML - LinkedIn
HTML - LinkedIn
 
Web development using html 5
Web development using html 5Web development using html 5
Web development using html 5
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Unit iv xml dom
Unit iv xml domUnit iv xml dom
Unit iv xml dom
 
Css Complete Notes
Css Complete NotesCss Complete Notes
Css Complete Notes
 
Css lecture notes
Css lecture notesCss lecture notes
Css lecture notes
 

Viewers also liked

Pw power point2010_ch1_p2a_carolineasantesanamughogho_1_3
Pw power point2010_ch1_p2a_carolineasantesanamughogho_1_3Pw power point2010_ch1_p2a_carolineasantesanamughogho_1_3
Pw power point2010_ch1_p2a_carolineasantesanamughogho_1_3
Caroline Mughogho
 
Html phrase tags
Html phrase tagsHtml phrase tags
Html phrase tags
eShikshak
 
Netflix
NetflixNetflix
Netflix
Carmen Dial
 
Instruction Set Of 8086 DIU CSE
Instruction Set Of 8086 DIU CSEInstruction Set Of 8086 DIU CSE
Instruction Set Of 8086 DIU CSE
salmancreation
 
Processor
ProcessorProcessor
Processor
Sandeep Kamath
 
Advanced micro -processor
Advanced micro -processorAdvanced micro -processor
Advanced micro -processor
Hinal Lunagariya
 
Class Intro / HTML Basics
Class Intro / HTML BasicsClass Intro / HTML Basics
Class Intro / HTML Basics
Shawn Calvert
 

Viewers also liked (7)

Pw power point2010_ch1_p2a_carolineasantesanamughogho_1_3
Pw power point2010_ch1_p2a_carolineasantesanamughogho_1_3Pw power point2010_ch1_p2a_carolineasantesanamughogho_1_3
Pw power point2010_ch1_p2a_carolineasantesanamughogho_1_3
 
Html phrase tags
Html phrase tagsHtml phrase tags
Html phrase tags
 
Netflix
NetflixNetflix
Netflix
 
Instruction Set Of 8086 DIU CSE
Instruction Set Of 8086 DIU CSEInstruction Set Of 8086 DIU CSE
Instruction Set Of 8086 DIU CSE
 
Processor
ProcessorProcessor
Processor
 
Advanced micro -processor
Advanced micro -processorAdvanced micro -processor
Advanced micro -processor
 
Class Intro / HTML Basics
Class Intro / HTML BasicsClass Intro / HTML Basics
Class Intro / HTML Basics
 

Similar to Html

HTML_JavaScript_Malaysia_2008 (2).ppt
HTML_JavaScript_Malaysia_2008 (2).pptHTML_JavaScript_Malaysia_2008 (2).ppt
HTML_JavaScript_Malaysia_2008 (2).ppt
Dianajeon3
 
Learn html Basics
Learn html BasicsLearn html Basics
Learn html Basics
McSoftsis
 
learnhtmlbyvipuladissanayake-170516061515 (1).pptx
learnhtmlbyvipuladissanayake-170516061515 (1).pptxlearnhtmlbyvipuladissanayake-170516061515 (1).pptx
learnhtmlbyvipuladissanayake-170516061515 (1).pptx
ManuAbraham17
 
Html and css
Html and cssHtml and css
PPT-203105353-1.pdf
PPT-203105353-1.pdfPPT-203105353-1.pdf
PPT-203105353-1.pdf
PINTUCHAUHAN8
 
Html
HtmlHtml
Chapter 2 Final.pptx
Chapter 2 Final.pptxChapter 2 Final.pptx
Chapter 2 Final.pptx
getnet51
 
Html
HtmlHtml
Unit 1wt
Unit 1wtUnit 1wt
Unit 1wt
vamsitricks
 
Html
HtmlHtml
BITM3730Week1.pptx
BITM3730Week1.pptxBITM3730Week1.pptx
BITM3730Week1.pptx
MattMarino13
 
HTML
HTMLHTML
Html 5
Html 5Html 5
Html and css
Html and cssHtml and css
Html and css
Sukrit Gupta
 
Unit 1-HTML Final.ppt
Unit 1-HTML Final.pptUnit 1-HTML Final.ppt
Unit 1-HTML Final.ppt
TusharTikia
 
HTML & CSS.ppt
HTML & CSS.pptHTML & CSS.ppt
HTML & CSS.ppt
vaseemshaik21
 
HTML.pptx
HTML.pptxHTML.pptx
HTML.pptx
DipaliJagtap6
 
vtu HTML+Course+Slide cse notes and .pdf
vtu HTML+Course+Slide cse notes and .pdfvtu HTML+Course+Slide cse notes and .pdf
vtu HTML+Course+Slide cse notes and .pdf
NaveenBhajantri1
 
Episode 14 - Basics of HTML for Salesforce
Episode 14 - Basics of HTML for SalesforceEpisode 14 - Basics of HTML for Salesforce
Episode 14 - Basics of HTML for Salesforce
Jitendra Zaa
 
Html tutorials by www.dmdiploma.com
Html tutorials by www.dmdiploma.comHtml tutorials by www.dmdiploma.com
Html tutorials by www.dmdiploma.com
ShwetaAggarwal56
 

Similar to Html (20)

HTML_JavaScript_Malaysia_2008 (2).ppt
HTML_JavaScript_Malaysia_2008 (2).pptHTML_JavaScript_Malaysia_2008 (2).ppt
HTML_JavaScript_Malaysia_2008 (2).ppt
 
Learn html Basics
Learn html BasicsLearn html Basics
Learn html Basics
 
learnhtmlbyvipuladissanayake-170516061515 (1).pptx
learnhtmlbyvipuladissanayake-170516061515 (1).pptxlearnhtmlbyvipuladissanayake-170516061515 (1).pptx
learnhtmlbyvipuladissanayake-170516061515 (1).pptx
 
Html and css
Html and cssHtml and css
Html and css
 
PPT-203105353-1.pdf
PPT-203105353-1.pdfPPT-203105353-1.pdf
PPT-203105353-1.pdf
 
Html
HtmlHtml
Html
 
Chapter 2 Final.pptx
Chapter 2 Final.pptxChapter 2 Final.pptx
Chapter 2 Final.pptx
 
Html
HtmlHtml
Html
 
Unit 1wt
Unit 1wtUnit 1wt
Unit 1wt
 
Html
HtmlHtml
Html
 
BITM3730Week1.pptx
BITM3730Week1.pptxBITM3730Week1.pptx
BITM3730Week1.pptx
 
HTML
HTMLHTML
HTML
 
Html 5
Html 5Html 5
Html 5
 
Html and css
Html and cssHtml and css
Html and css
 
Unit 1-HTML Final.ppt
Unit 1-HTML Final.pptUnit 1-HTML Final.ppt
Unit 1-HTML Final.ppt
 
HTML & CSS.ppt
HTML & CSS.pptHTML & CSS.ppt
HTML & CSS.ppt
 
HTML.pptx
HTML.pptxHTML.pptx
HTML.pptx
 
vtu HTML+Course+Slide cse notes and .pdf
vtu HTML+Course+Slide cse notes and .pdfvtu HTML+Course+Slide cse notes and .pdf
vtu HTML+Course+Slide cse notes and .pdf
 
Episode 14 - Basics of HTML for Salesforce
Episode 14 - Basics of HTML for SalesforceEpisode 14 - Basics of HTML for Salesforce
Episode 14 - Basics of HTML for Salesforce
 
Html tutorials by www.dmdiploma.com
Html tutorials by www.dmdiploma.comHtml tutorials by www.dmdiploma.com
Html tutorials by www.dmdiploma.com
 

More from baabtra.com - No. 1 supplier of quality freshers

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
baabtra.com - No. 1 supplier of quality freshers
 
Best coding practices
Best coding practicesBest coding practices
Core java - baabtra
Core java - baabtraCore java - baabtra
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
baabtra.com - No. 1 supplier of quality freshers
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
baabtra.com - No. 1 supplier of quality freshers
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
baabtra.com - No. 1 supplier of quality freshers
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php database connectivity
Php database connectivityPhp database connectivity
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
baabtra.com - No. 1 supplier of quality freshers
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Blue brain
Blue brainBlue brain
5g
5g5g
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Gd baabtra
Gd baabtraGd baabtra

More from baabtra.com - No. 1 supplier of quality freshers (20)

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
 
Core java - baabtra
Core java - baabtraCore java - baabtra
Core java - baabtra
 
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php sessions & cookies
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
 
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Microsoft holo lens
 
Blue brain
Blue brainBlue brain
Blue brain
 
5g
5g5g
5g
 
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Aptitude skills baabtra
 
Gd baabtra
Gd baabtraGd baabtra
Gd baabtra
 

Recently uploaded

Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 

Recently uploaded (20)

Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 

Html

  • 2. What is HTML? • HTML stands for Hyper Text Markup Language . • It is used to design and develop Web Pages. • HTML is – A Simple mark up language (NOT a programming language) – Browser/Platform Independent (plain ASCII text format) – Not Case Sensitive – HTML is Interpreted by browser (NOT compiled). – A medium for User Interface (GUI)
  • 3. HTML Tags • The HTML instructions are called tags, and look like <TAG> ….. Text here…….. </TAG> • Tags are used for data presentation • There are two types of tags 1. Container tags : Tags that have starting as well as ending part. e.g. <TITLE> Title of the Web Page </TITLE> 2. Empty tags : Tags that do not have the closing part. e.g. <BR> , <HR>
  • 4. HTML Elements and attributes • HTML elements = (HTML instructions + text to which the instructions apply) • An attribute is an additional feature you can use to configure the element, Attributes are optional.
  • 5. <H1 ALIGN = ‚CENTER‛> This is a heading </H1> Example
  • 6. <H1 ALIGN = ‚CENTER‛> This is a heading </H1> Example Starting Tag
  • 7. <H1 ALIGN = ‚CENTER‛> This is a heading </H1> Example End Tag
  • 8. <H1 ALIGN = ‚CENTER‛> This is a heading </H1> Example Attributes
  • 9. <H1 ALIGN = ‚CENTER‛> This is a heading </H1> Example HTML element
  • 10. HTML Document Structure • An HTML file can be created by using a simple text editor viz notepad, text pad, Eclipse IDE editor • HTML file must have an extension htm or html. <HTML> <HEAD> <TITLE>Title of the Web Page </TITLE> </HEAD> <BODY> <H1> Contents </H1> </BODY> </HTML>
  • 11. HTML Document - Head • Enclosed in <HEAD> </HEAD> tag • Tags that can go in the document head – <TITLE> : Indicates the title of the document that is used as the window caption – <STYLE > : To Include CSS (Cascading Style Sheet) – <LINK rel=‚stylesheet‛ type=‚text/css‛ href=‚file path‛> : specifies the relationship between the current document and other documents. – <SCRIPT type=‚text/javascript‛> : specifies the client side script name which used to perform the client side validation. 11
  • 12. HTML Document - Head • <meta> tag provides metadata about the HTML document. Metadata will not be displayed on the page, but will be machine parsable. • Meta elements are typically used to specify page description, keywords, author of the document, last modified, and other metadata. • The metadata can be used by browsers (how to display content or reload page), search engines (keywords), or other web services. <meta name="description" content="Free Web tutorials"> <meta charset="UTF-8">
  • 13. HTML Document - Head <HTML> <HEAD> <TITLE>Title of the Web Page </TITLE> <STYLE > </style> <LINK rel=“stylesheet” type=“text/css” href=“file path”> <SCRIPT type=“text/javascript”> <meta name="description" content="Free Web tutorials"> </HEAD> <BODY> <H1> Contents </H1> </BODY> </HTML>
  • 14. HTML Document – Body • Enclosed in <BODY> </BODY> tag. • Some important attributes of the BODY tag – BGCOLOR = ‚color‛ / ‚#rrggbb‛ – BACKGROUND = ‚url of the image‛ – TEXT = ‚color‛ / ‚#rrggbb‛ – LINK = ‚color‛ / ‚#rrggbb‛ – ALINK = ‚color‛ / ‚#rrggbb‛ – VLINK = ‚color‛ / ‚#rrggbb‛ • Colors are defined using a hexadecimal notation for the combination of Red, Green, and Blue color values (RGB). 14
  • 15. Try Out • Create an html page and name it first.html using the text editor present in your system. The html page should have a text message ‚Welcome to HTML‛ .
  • 16. Try Out • In the body of first.html try out the various attributes mentioned below: <body BGCOLOR="RED" BACKGROUND="Chrysanthemum.jpg" TEXT = "#000000" LINK = "#FFFF00" ALINK = "RED" VLINK = "WHITE‚>
  • 17. DOM Structure • The usual parent/child relationship between node • Like any other tree, you can walk this
  • 19. <FONT> • Allows you to specify the font face and font size and other fond styling's. – Some common attributes are • FACE : specifies the font type. – Defaults fonts like ‚Arial‛, ‚Times New Roman‛, and ‚Courier‛ are available in all Systems. • SIZE : specifies the font size. – Value can range from 1 to 7. The default is 3. – SIZE can be set as a relative value using + or – . • COLOR : specifies the color – The color of a font can be specified using a hexadecimal number value six characters long. <FONT FACE=“Arial” SIZE=“7” COLOR=“#FF0000”> The Written Word </FONT>
  • 20. Text Formatting tags • Paragraphs <P> </P> - used to create paragraphs. • Line Breaks <BR> - to insert returns or blank lines in the document. e.g. : <P>This <BR> is a para<BR>graph with line breaks</P> • Horizontal Lines <HR> - used to draw a horizontal line across the web page. E.g: <HR ALIGN = ‚right‛ WIDTH = ‚50%‛> • Comments in HTML <!-- Content here -->
  • 21. Text Formatting tags • Header Tags – HTML has six level of headings. – Displayed in larger and bolder fonts. – Different level heading tags <H1> Heading 1 </H1> <H2> Heading 2 </H2> <H3> Heading 3 </H3> <H4> Heading 4 </H4> <H5> Heading 5 </H5> <H6> Heading 6 </H6> • The font size of the heading will go on decreasing from H1 to H6.
  • 22. Text Formatting tags • <B>….</B> - Bold • <I>……</I> - Italic • <U>….</U> - Underline • <STRIKE>…</STRIKE> - Strikethrough • <CENTER></CENTER> - Centers the text on the screen. • <SUB>….</SUB> - Subscript • <SUP>….</SUP> - Superscript 22
  • 23. Try Out • Modify first.html with following features – Add 3 headings with paragraphs underneath to each – Each paragrapshs and heading should be of different color – Each heading should be italic – Each subheading should be italic, bold and underlined
  • 25. Lists in HTML • There are three types of lists in HTML – Ordered List – Unordered List – Description List
  • 26. Lists in HTML • Un Ordered list <ul> <li> baabtra</li> <li> baabte</li> </ul> Out Put • Baabtra • baabte
  • 27. Lists in HTML • Ordered list <ol> <li>Projects</li> <li>Products</li> <li>Services</li> </ol> Out Put 1. Projects 2. Products 3. Services
  • 28. Lists in HTML • Description list <dl> <dt> baabte</dt> <dd> - Parent company</dd> <dt> baabte</dt> <dd> - Training division</dd> </dl> Out Put baabte - Parent company Baabte - Training division
  • 29. Inline and Block-Level Elements • Elements inside the <BODY> tag are classified as – block-level elements and –Block-level elements usually begin on a new line. Generally, block- level elements may contain inline elements and other block-level elements –Eg :<H1><P><HR> – Inline elements. –Inline elements usually stay on the same line –Eg: <FONT><I><BOLD> 29
  • 30. Linking Pages • Used to link text with other documents • <A></A> – HREF – NAME (bookmarks inside the page) – TITLE (balloon help in IE) – TARGET (Define where the linked document will be opened) e.g.: <A href=‚next.html‛> Click here </A> • Used to link text with same documents (called bookmarking) 30 <BODY link=“blue” alink=“green” vlink=“red”> <A name=“top”> Top of the Page </A> …………………………………………………… <A href=“#top”>Top</A> </BODY>
  • 31. Absolute and Relative Link • You can reference a document within an HREF attribute in Two ways. Absolutely or relatively. • An absolute link is created when the href value is a fully qualified URL. • Eg: <A HREF = ‚www.google.com"> Google</A> • <A HREF=‚C:/html/project/index.html‛>HTML project</A> • A relative link is created when the destination href value is relative to the location of the current webpage • <A HREF = ‚../jsp/display.jsp‛> Display details</A> • <A HREF=‚../project/index.html‛>HTML project</A> • Using relative links allows the web site to remain intact even if the site is moved to another server.
  • 32. Tables • Displays data in a tabular format so as helps to positioning the contents of the page in a more structured way • <TABLE> ….. </TABLE> • Some attributes • ALIGN = LEFT | RIGHT | CENTER • BORDER = n (Number of Pixels ) • BGCOLOR = ‚color‛ | ‚#rrggbb‛ • WIDTH = % Of Parent | n (pixels) • CELLSPACING = n (Number of Pixels ) -Specifies the space between the cell wall and contents • CELLPADDING = n(Number of Pixels )- Specifies the space between cell
  • 33. Tables <TABLE BORDER=1> <TR> <TH> first header cell contents </TH> <TH> last header cell contents </TH> </TR> <TR> <TD> first row, first cell contents </TD> <TD> first row, last cell contents </TD> </TR> <TR> <TD> last row, first cell contents </TD> <TD> last row, last cell contents </TD> </TR> </TABLE>
  • 34. <h2> Account details</h2> <TABLE BORDER="1" CELLSPACING="10" CELLPADDING="1" WIDTH=‚100%"> <TR> <TH>AccountNo</TH><TH>Customer Name</TH> </TR> <TR> <TD>1001</TD><TD>Jack</TD> </TR> <TR> <TD>1002</TD><TD>Tom</TD> </TR> </TABLE> Creating tables 1 34
  • 35. Creating tables 2 <TABLE BORDER=2 BGCOLOR="#B45F04"> <TR ALIGN="CENTER"> <TD COLSPAN=3>MINI STATEMENT</TD> </TR> <TR ALIGN="CENTER‚> <TH>Account ID</TH> <TH>Date</TH> <TH>Amount</TH> </TR> <TR> <TD>54576989</TD> <TD>12-Jan-2009</TD> <TD>3000.00</TD> </TR> <TR> <TD>56783297</TD> <TD>27-Feb-2009</TD> <TD>500.00</TD> </TR> </TABLE>
  • 36. Iframe • An iframe is used to display a web page within a web page. <iframe src=‚baabtra.html" width="200" height="200"></iframe>
  • 37. Some characters like the < character, have a special meaning in HTML, and therefore cannot be used in the text. The most common character entities: HTML Character Entities Result Description Entity Name < > & ‚ ‘ non-breaking space less than greater than ampersand quotation mark apostrophe &nbsp; &lt; &gt; &amp; &quot; &apos;
  • 38. HTML Character Entities - DEMO <html> <head> <title>Entity example</title> </head> <body bgcolor="cyan"> <h1>HTML</h1> <!-- without using Entities --> <h3>All html source code stars with <HTML> Tag</h3> <!-- using Entities to dispaly <HTML> --> <h3>All html source code stars with &lt;HTML&gt; Tag</h3> &copy; &nbsp;&nbsp;XYZ &reg;&nbsp; </body> </html>
  • 39. Forms • Used for creating Graphical User Interface (GUI) • In a web application client interact through GUI. • FORM by itself really cannot do anything • Forms become powerful when connected to a server application • A single HTML page can have multiple forms.
  • 40. Forms • Can be designed using <FORM></FORM> tag <FORM NAME=‚form1‛ ACTION="abc.jsp" METHOD=GET> </FORM> (form elements go here)
  • 41. Forms • Can be designed using <FORM></FORM> tag <FORM NAME=‚form1‛ ACTION="abc.jsp" METHOD=GET> </FORM> (form elements go here) is used for future manipulation of data by scripting language
  • 42. Forms • Can be designed using <FORM></FORM> tag <FORM NAME=‚form1‛ ACTION="abc.jsp" METHOD=GET> </FORM> (form elements go here) indicates a program on the server that will be executed when this form is submitted. Mostly it will be an ASP or a JSP script.
  • 43. Forms • Can be designed using <FORM></FORM> tag <FORM NAME=‚form1‛ ACTION="abc.jsp" METHOD=GET> </FORM> (form elements go here) indicates the way the form is submitted to the server - popular options are GET/POST
  • 44. Form elements • <INPUT> tag is used to add elements to the form • NAME = ‚controlname‛ • TYPE = text / password / checkbox / radio/ submit / reset /button / hidden / file • VALUE • MAXLENGTH • SIZE • All elements should be named by setting a unique value to the name attribute. • The value attribute is used to set a default value for the control.
  • 45. Text Box/Password • A text field can be added to the form by typing – <INPUT TYPE=‚TEXT" NAME=‚txtcompany" VALUE=‛XYZ‛ SIZE="10" MAXLENGTH="15"> • A password field can be added to the form by typing – <INPUT TYPE=‚PASSWORD‛ NAME=‚pwdLogin‛ SIZE=‚50‛ MAXLENGTH=‚12‛> – when the text is entered, stars appear instead of the typed letters • Attributes are – VALUE : is the default value loaded – SIZE – MAXLENGTH : specifies max number of characters that can be entered to the control
  • 46. Text Area • Multiline text input – <TEXTAREA NAME=‚feedback‛ ROWS=‚3‛ COLS=‚40‛> Default text goes here – </TEXTAREA> • ROWS is the number of rows displayed • COLS is the no of characters per line • Default text is optional • Dose not have VALUE and MAXLENGTH attributes • The default text is to be put into <TEXTAREA> </TEXTAREA> tags
  • 47. List Box ( Drop-down box) • SIZE : number of lines to display • VALUE : indicates what will be sent to the server • SELECTED : sets the default selected item • MULTIPLE : will allow multiple selection of items – Eg: <SELECT NAME=‚Hobbies‛ MULTIPLE SIZE=‚3‛> <SELECT NAME=‚Hobbies‛> <OPTION VALUE=‚T‛>Travel <OPTION VALUE=‚R‛ SELECTED>Reading <OPTION VALUE=‚S‛>Sleeping <OPTION VALUE=‚W‛>Walking </SELECT>
  • 48. Check Box • <INPUT TYPE="checkbox" NAME=‛contact" VALUE=‚email‛ CHECKED> Notify by email • Used for multiple selection • VALUE indicates the value to be transmitted to the server – e.g: contact=email will be sent to the server • CHECKED sets the checkbox to be selected by default • Here ‚Notify by email‛ is visible to the user and the value ‚email‛ is not visible to the user 48
  • 49. Buttons • The Submit button • Sends the form contents to the server when clicked • By default only submit button can invoke the action page and send data to server. • <INPUT TYPE=submit NAME=cmdsubmit VALUE =‚Submit‛> • The Reset button • Resets all the form controls to the default state. • <INPUT TYPE=Reset NAME=cmdReset VALUE="Reset">. • A button • No predetermined action like submit or reset. • Script should be written to make it work. (this will be covered in later chapters) • <INPUT TYPE=Button NAME=cmdAdd VALUE=‚Click Me">.
  • 50. Radio Buttons • Radio buttons with the same NAME are grouped together • Radio buttons are used for Single selection • Only one button can be selected in a group • VALUE data to be sent to the server • CHECKED will preselect the button 50 <INPUT TYPE="radio" NAME="output" VALUE="screen‚ checked> Screen <INPUT TYPE="radio" NAME="output" VALUE="printer">Printer
  • 51. Hidden text field <INPUT TYPE=‚hidden‛ NAME=‚userinformation‛ VALUE =‚form1‛> – Not displayed to the user – Can be used to pass data from one form to another – Cannot be modified by the user – So it must have a VALUE attribute set – VALUE data to be sent to the server – Mainly used in server side programming 51
  • 52. 52 Form example • To display the form elements in a visually appealing way, put them into table cells as shown in the above form.
  • 53. Form Object action Reflects the ACTION attribute. elements An array reflecting all the elements in a form. length Reflects the number of elements on a form. method Reflects the METHOD attribute. reset() Resets a form. submit() Submits a form. Properties Methods Event and event Handlers Reset onReset(), Submit onSubmit()
  • 54. Text, Textarea, Password, hidden Objects • Properties – defaultValue : Reflects the VALUE attribute. – name : NAME attribute. – type : Reflects the TYPE attribute. – value : Reflects the current value of the Text object’s field. • Methods – focus() : Gives focus to the object. – blur() : Removes focus from the object. – select() : Selects the input area of the object. • Event Handler – onBlur : when a form element loses focus – onChange : field loses focus and its value has been modified. – onFocus : when a form element receives input focus. – onSelect : when a user selects some of the text within a text field.
  • 55. HTML Events • Click • Moserover • Mousemove • Mousedown • Mouseup • Keypress • Keydown • Keyup
  • 56. How to Access username using DOM <form name=‚userlogin‛> Username <input type=‚text‛ name=‚username‛> Password<input type=‚text‛ name=‚pass‛> </form> • document object refers the html document.(<body> tag) • Inside the document we have a form object • Inside form we have two textboxes • According to the DOM we can access the value inside the textbox using JavaScript like document.userlogin.username.value • In an form we are accessing elements by name. • The name should be unique.
  • 57. 57 Try Out • Create a login screen with a heading Login , two text fields user name , password and a submit button. Put the UI elements in a table structure so as to give it good look and feel.