SlideShare a Scribd company logo
1 of 32
INTRODUCTION TO
CREATING A BASIC STARTING
DOCUMENT
• <HTML>
• <HEAD>
• <TITLE> my first html web page </TITLE>
• </HEAD>
• <BODY>
• <!-- Here we will put the page elements -->
• </BODY>
• </HTML>
IMAGE ELEMENT <IMG />
• When working with images, the element you'll be using
is img.
• It doesn't require a closing tag. It's written in HTML as
<img /> .
• The next thing you'll want to do for your image is add
width and height values.
• “Alt” is the text that will appear if the image is not exist.
<html>
<head>
<title> My first html page </title>
</head>
<BODY>
<img src="Desert.jpg" width="250“
height="188" alt="Desert image" />
</BODY>
</HTML>
EXAMPLE
LINKS <A HREF=“ “></A>
• Standard links are generated using the anchor element
<a>. . .</a>.
• The hypertext reference attribute (href) is used to denote
the link address .
• Text content within the opening and closing tags will
appear as linked text.
<html>
<head>
<title> My first html page </title>
</head>
<BODY BGCOLOR="#FFFFFF"
TEXT="#FF0000" >
<p>
introduction to computer course
</p>
<a href="http://www.google.com">
open Google web site
</a>
</BODY>
</HTML>
EXAMPLE
HTML COMMENTS
• Comment <!--...-->
• Another important piece of markup that you'll want to get
started using right away is HTML comments.
• Comments enable you to hide content or markup for
temporary purposes or backward compatibility, to identify
sections within your document, and to provide directives
for other folks who might be working on the page.
HTML FORM
• The form element <form> </form>:
• All forms begin with the form element <form> and ends with
</form>
HTML SYNTAX ( TEXTBOX )
• Textbox <input type=text/>:
• Input textboxes are used for a number of form needs, including any
time you want someone to type out his name, address, and so forth.
• To create a textbox, you use the input element along with the type
attribute and a value of text.
• EX:
<form method="get" action=“ ">
First Name: <input type="text" /> <br>
Last Name: <input type="text" /> <br>
Phone: <input type="text" />
</form>
HTML SYNTAX ( TEXTBOX )
• Value attribute is used to set the default value
• EX:
<form method="get" action=“ ">
First Name: <input type="text" value =“ahmed”/> <br>
Last Name: <input type="text" /> <br>
Phone: <input type="text“ value=“1234565789 ” />
</form>
HTML SYNTAX ( TEXTBOX )
• Type =“password” is used to hide the entered data
• EX:
<form method="get" action=“ ">
First Name: <input type="text" value =“ahmed”/> <br>
Password : <input type=“password" /> <br>
</form>
HTML SYNTAX (CHECK BOX )
• Check box <input type="checkbox" />:
• Check boxes are an excellent way to get information from a site visitor from a
preset selection of choices.
• The advantage of check boxes is that visitors can select from more than one
option, and that's the best time to use them when the possibility of multiple
answers exists.
• To create check boxes, you use the input element along with the type
attribute and a value of checkbox
• You can display your check boxes with preselected choices by using the
“checked” attribute.
• Preselecting Checked Items checked="checked“
• EX: <input type="checkbox" name="reading1" id="reading1" />
Reading1 <br />
• EX: <input type="checkbox" name="reading2" id="reading2"
checked="checked"/> Reading2 <br />
HTML SYNTAX (RADIO BUTTON)
• Radio Button<input type=“radio" />:
• The advantage of Radio Button is that visitors can select one
option.
• To create check boxes, you use the input element along with the type
attribute and a value of checkbox
• You can display your radio buttons with preselected choices by
using the “checked” attribute.
• Preselecting radio Items checked="checked“
• <input type="radio" name=“gender" value=0 /> male <br />
• <input type="radio" name=“gender" value=1
checked="checked" /> female <br />
HTML SYNTAX( COMBO BOX )
• Two types of form menus exist: drop-down and list.
• Form menu (drop-down )
• <select>
• <option value="?"> ?? </option>
• </ select>
• preselected choices selected="selected”
• Ex:
<select>
<option value=“sport"> sport </option>
<option value=“news“ selected="selected“ >news</option>
</select>
HTML SYNTAX( COMBO BOX )
• The menu now becomes a menu list, allowing your visitor to make
• multiple selections
• <select multiple="multiple“>
• <option value="?"> ?? </option>
• </ select>
• preselected choices selected="selected”
• Ex:
<select multiple="multiple">
<option value="Arizona">Arizona</option>
<option value="California">California</option>
<option value="Colorado">Colorado</option>
<option value="Nevada" selected="selected">Nevada</option>
<option value="Texas">Texas</option>
<option value="Utah">Utah</option>
</select>
HTML SYNTAX
• Label :
• <label for="fieldname">some text</label>
• The label element allows information to be attached to a given
control.
<form action="demo_form.asp">
<label for="male"> Male </label>
<input type="radio" name=“gender" id="male“
value="male"><br>
<label for="female">Female</label>
<input type="radio" name=" gender " id="female"
value="female"><br><br>
</form>
HTML SYNTAX
• Grouping Form Fields
• <fieldset>
• <legend> header for the field
• </legend>
• Some fields
• </fieldset>
• You can break down areas of the form into specific
sets of fields using the fieldset element.
• you can use the legend element to add a header for
each of those sections, further providing context.
EXAMPLE
• <fieldset>
• <legend> user name and password
• </legend>
• user Name: <input type="text"/> <br>
• Password : <input type="password" /> <br>
• </fieldset>
HTML SYNTAX
• Text Area:
• <textarea>........ </textarea>
• The <textarea> tag defines a multi-line text input control. Always a
good idea to add this information.
• The size of a textarea can be specified by the cols and rows
attributes, or even better; through CSS' height and width
properties.
• Don’t have a value attributes
HTML SYNTAX
• Form buttons:
<input type="submit" />
<input type="reset"/>
• The reset button clears the form when it is clicked.
• The submit button submits the data in the form, which uses the
information in the method and action attributes in the form
element itself to send the data to the server for processing.
HTML SYNTAX
• The Div tag <div></div>:
• The <div> tag defines a division or a section in an HTML
document.
• The <div> tag is often used to group block-elements to format
them with styles.
• The div element is very often used with CSS to layout a web
page.
• Browsers usually place a line break before and after the div
element.
HANDS ON
HANDS ON SOLUTION
HANDS ON SOLUTION
ASSIGNMENT

More Related Content

Similar to web-lab2 for computer science html tss css java

HTML5 - Forms
HTML5 - FormsHTML5 - Forms
HTML5 - Forms
tina1357
 
Form using html and java script validation
Form using html and java script validationForm using html and java script validation
Form using html and java script validation
Maitree Patel
 

Similar to web-lab2 for computer science html tss css java (20)

uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
 
Html4
Html4Html4
Html4
 
Web forms and html (lect 4)
Web forms and html (lect 4)Web forms and html (lect 4)
Web forms and html (lect 4)
 
5. Frames & Forms.pdf
5. Frames & Forms.pdf5. Frames & Forms.pdf
5. Frames & Forms.pdf
 
Lecture-5.pptx
Lecture-5.pptxLecture-5.pptx
Lecture-5.pptx
 
Html4
Html4Html4
Html4
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
 
Lab1_HTML.pptx
Lab1_HTML.pptxLab1_HTML.pptx
Lab1_HTML.pptx
 
INTRODUCTION TO HTML & CSS .pptx
INTRODUCTION TO HTML & CSS .pptxINTRODUCTION TO HTML & CSS .pptx
INTRODUCTION TO HTML & CSS .pptx
 
Html and css
Html and cssHtml and css
Html and css
 
HTML 5 Basics Part Three
HTML 5 Basics Part ThreeHTML 5 Basics Part Three
HTML 5 Basics Part Three
 
HTML5 - Forms
HTML5 - FormsHTML5 - Forms
HTML5 - Forms
 
Std 12 Computer Chapter 1 Creating Html Forms Using KompoZer
Std 12 Computer Chapter 1 Creating Html Forms Using KompoZerStd 12 Computer Chapter 1 Creating Html Forms Using KompoZer
Std 12 Computer Chapter 1 Creating Html Forms Using KompoZer
 
Lecture17.pdf
Lecture17.pdfLecture17.pdf
Lecture17.pdf
 
IntroHTML.ppt
IntroHTML.pptIntroHTML.ppt
IntroHTML.ppt
 
HTML.ppt
HTML.pptHTML.ppt
HTML.ppt
 
IntroHTML.ppt
IntroHTML.pptIntroHTML.ppt
IntroHTML.ppt
 
wt mod2.pdf
wt mod2.pdfwt mod2.pdf
wt mod2.pdf
 
Forms
FormsForms
Forms
 
Form using html and java script validation
Form using html and java script validationForm using html and java script validation
Form using html and java script validation
 

Recently uploaded

原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
ydyuyu
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Monica Sydney
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
JOHNBEBONYAP1
 
一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理
F
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Monica Sydney
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Monica Sydney
 
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
AS
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
gajnagarg
 

Recently uploaded (20)

Leading-edge AI Image Generators of 2024
Leading-edge AI Image Generators of 2024Leading-edge AI Image Generators of 2024
Leading-edge AI Image Generators of 2024
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
 
Sensual Call Girls in Tarn Taran Sahib { 9332606886 } VVIP NISHA Call Girls N...
Sensual Call Girls in Tarn Taran Sahib { 9332606886 } VVIP NISHA Call Girls N...Sensual Call Girls in Tarn Taran Sahib { 9332606886 } VVIP NISHA Call Girls N...
Sensual Call Girls in Tarn Taran Sahib { 9332606886 } VVIP NISHA Call Girls N...
 
一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
 
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime BalliaBallia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
 
Call girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girlsCall girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girls
 
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
 
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsMira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
 
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
 

web-lab2 for computer science html tss css java

  • 2. CREATING A BASIC STARTING DOCUMENT • <HTML> • <HEAD> • <TITLE> my first html web page </TITLE> • </HEAD> • <BODY> • <!-- Here we will put the page elements --> • </BODY> • </HTML>
  • 3. IMAGE ELEMENT <IMG /> • When working with images, the element you'll be using is img. • It doesn't require a closing tag. It's written in HTML as <img /> . • The next thing you'll want to do for your image is add width and height values. • “Alt” is the text that will appear if the image is not exist.
  • 4. <html> <head> <title> My first html page </title> </head> <BODY> <img src="Desert.jpg" width="250“ height="188" alt="Desert image" /> </BODY> </HTML> EXAMPLE
  • 5. LINKS <A HREF=“ “></A> • Standard links are generated using the anchor element <a>. . .</a>. • The hypertext reference attribute (href) is used to denote the link address . • Text content within the opening and closing tags will appear as linked text.
  • 6. <html> <head> <title> My first html page </title> </head> <BODY BGCOLOR="#FFFFFF" TEXT="#FF0000" > <p> introduction to computer course </p> <a href="http://www.google.com"> open Google web site </a> </BODY> </HTML> EXAMPLE
  • 7. HTML COMMENTS • Comment <!--...--> • Another important piece of markup that you'll want to get started using right away is HTML comments. • Comments enable you to hide content or markup for temporary purposes or backward compatibility, to identify sections within your document, and to provide directives for other folks who might be working on the page.
  • 8. HTML FORM • The form element <form> </form>: • All forms begin with the form element <form> and ends with </form>
  • 9. HTML SYNTAX ( TEXTBOX ) • Textbox <input type=text/>: • Input textboxes are used for a number of form needs, including any time you want someone to type out his name, address, and so forth. • To create a textbox, you use the input element along with the type attribute and a value of text. • EX: <form method="get" action=“ "> First Name: <input type="text" /> <br> Last Name: <input type="text" /> <br> Phone: <input type="text" /> </form>
  • 10.
  • 11. HTML SYNTAX ( TEXTBOX ) • Value attribute is used to set the default value • EX: <form method="get" action=“ "> First Name: <input type="text" value =“ahmed”/> <br> Last Name: <input type="text" /> <br> Phone: <input type="text“ value=“1234565789 ” /> </form>
  • 12.
  • 13. HTML SYNTAX ( TEXTBOX ) • Type =“password” is used to hide the entered data • EX: <form method="get" action=“ "> First Name: <input type="text" value =“ahmed”/> <br> Password : <input type=“password" /> <br> </form>
  • 14.
  • 15. HTML SYNTAX (CHECK BOX ) • Check box <input type="checkbox" />: • Check boxes are an excellent way to get information from a site visitor from a preset selection of choices. • The advantage of check boxes is that visitors can select from more than one option, and that's the best time to use them when the possibility of multiple answers exists. • To create check boxes, you use the input element along with the type attribute and a value of checkbox • You can display your check boxes with preselected choices by using the “checked” attribute. • Preselecting Checked Items checked="checked“ • EX: <input type="checkbox" name="reading1" id="reading1" /> Reading1 <br /> • EX: <input type="checkbox" name="reading2" id="reading2" checked="checked"/> Reading2 <br />
  • 16.
  • 17. HTML SYNTAX (RADIO BUTTON) • Radio Button<input type=“radio" />: • The advantage of Radio Button is that visitors can select one option. • To create check boxes, you use the input element along with the type attribute and a value of checkbox • You can display your radio buttons with preselected choices by using the “checked” attribute. • Preselecting radio Items checked="checked“ • <input type="radio" name=“gender" value=0 /> male <br /> • <input type="radio" name=“gender" value=1 checked="checked" /> female <br />
  • 18.
  • 19. HTML SYNTAX( COMBO BOX ) • Two types of form menus exist: drop-down and list. • Form menu (drop-down ) • <select> • <option value="?"> ?? </option> • </ select> • preselected choices selected="selected” • Ex: <select> <option value=“sport"> sport </option> <option value=“news“ selected="selected“ >news</option> </select>
  • 20.
  • 21. HTML SYNTAX( COMBO BOX ) • The menu now becomes a menu list, allowing your visitor to make • multiple selections • <select multiple="multiple“> • <option value="?"> ?? </option> • </ select> • preselected choices selected="selected” • Ex: <select multiple="multiple"> <option value="Arizona">Arizona</option> <option value="California">California</option> <option value="Colorado">Colorado</option> <option value="Nevada" selected="selected">Nevada</option> <option value="Texas">Texas</option> <option value="Utah">Utah</option> </select>
  • 22.
  • 23. HTML SYNTAX • Label : • <label for="fieldname">some text</label> • The label element allows information to be attached to a given control. <form action="demo_form.asp"> <label for="male"> Male </label> <input type="radio" name=“gender" id="male“ value="male"><br> <label for="female">Female</label> <input type="radio" name=" gender " id="female" value="female"><br><br> </form>
  • 24. HTML SYNTAX • Grouping Form Fields • <fieldset> • <legend> header for the field • </legend> • Some fields • </fieldset> • You can break down areas of the form into specific sets of fields using the fieldset element. • you can use the legend element to add a header for each of those sections, further providing context.
  • 25. EXAMPLE • <fieldset> • <legend> user name and password • </legend> • user Name: <input type="text"/> <br> • Password : <input type="password" /> <br> • </fieldset>
  • 26. HTML SYNTAX • Text Area: • <textarea>........ </textarea> • The <textarea> tag defines a multi-line text input control. Always a good idea to add this information. • The size of a textarea can be specified by the cols and rows attributes, or even better; through CSS' height and width properties. • Don’t have a value attributes
  • 27. HTML SYNTAX • Form buttons: <input type="submit" /> <input type="reset"/> • The reset button clears the form when it is clicked. • The submit button submits the data in the form, which uses the information in the method and action attributes in the form element itself to send the data to the server for processing.
  • 28. HTML SYNTAX • The Div tag <div></div>: • The <div> tag defines a division or a section in an HTML document. • The <div> tag is often used to group block-elements to format them with styles. • The div element is very often used with CSS to layout a web page. • Browsers usually place a line break before and after the div element.

Editor's Notes

  1. 09/22/97