SlideShare a Scribd company logo
DR. S. & S.S. GHANDHY
GOVERNMENT ENGINEERING
COLLEGE, SURAT
A Presentation on subject W.T.
(HTML Tables and Forms)
PRESENTED BY :
Prof J. J. Patel
(Faculty Guide)
Electronics & Communication Department
Name Enrollment number
Hinesh Miyani 180230111035
HTML Tables and Forms
TOPICS TO BE DISCUSSED:
 Introduction to HTML
 HTML Tables
 Spanning Multiple Rows and Cells
 Cell Padding and Spacing
 HTML Forms
 HTML Form Attributes
 HTML Form Elements
 HTML Input Types and Attributes
Introduction to HTML
What is HTML?
 HTML stands for Hyper Text Markup Language.
 HTML is the standard markup language for creating Web pages.
 HTML describes the structure of a Web page.
 We can apply this markup language to web pages to display
text, images, sound and movie files, and almost any other type
of electronic information.
 We use the language to format documents and link them
together, regardless of the type of computer with which the file
was originally created.
HTML Tables
 Tables represent tabular data
 A table consists of one or several rows
 Each row has one or more columns
 Tables comprised of several core tags:
 <table></table>: begin / end the table
 <tr></tr>: create a table row
 <td></td>: create tabular data (cell)
 Tables should not be used for layout
 Use CSS floats and positioning styles instead
HTML Tables
<table border="1">
<tr>
<td>Row 1 Cell 1</td>
<td>Row 1 Cell 2</td>
</tr>
<tr>
<td>Row 2 Cell 1</td>
<td>Row 2 Cell 2</td>
</tr>
</table>
 Content is placed within tables cells. A table cell is defined by
<td> and </td>.
 The border attribute defines how wide the table's border will be.
Table Heading
<table border="1">
<thead>
<th>Name</th>
<th>Salary</th>
</thead>
<tbody>
<tr>
<td>Ramesh Shah</td>
<td>5000</td>
</tr>
<tr>
<td>Amit Bhaskar</td>
<td>7000</td>
</tr>
</tbody>
</table>
 The <thead> tag is used to group header content in an HTML table.
 The <tbody> tag is used to group the body content in an HTML table.
 The <th> tag defines a header cell in an HTML table.
Spanning Multiple Rows and
Cells
<table border="1">
<thead>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
</thead>
<tbody>
<tr>
<td rowspan="2">Row 1 Cell 1</td>
<td>Row 1 Cell 2</td>
<td>Row 1 Cell 3</td>
</tr>
<tr>
<td>Row 2 Cell 2</td>
<td>Row 2 Cell 3</td>
</tr>
<tr>
<td colspan="3">Row 3 Cell 1</td>
</tr>
</tbody>
</table>
 We will use colspan attribute if we want to merge two or more columns into a
single column.
 Similar way we will use rowspan if we want to merge two or more rows.
Cell Padding and Spacing
<table border="1" cellpadding="20">
<thead>
<th>Column 1</th>
<th>Column 2</th>
</thead>
<tbody>
<tr>
<td>Row 1 Cell 1</td>
<td>Row 1 Cell 2</td>
</tr>
<tr>
<td>Row 2 Cell 1</td>
<td>Row 2 Cell 2</td>
</tr>
</tbody>
</table>
 There are two attributes called cellpadding and cellspacing which we
will use to adjust the white space in our table cells.
 The cellpadding represents the distance between cell borders and the
content within a cell.
Cell Padding and Spacing
<table border="1" cellspacing="10">
<thead>
<th>Column 1</th>
<th>Column 2</th>
</thead>
<tbody>
<tr>
<td>Row 1 Cell 1</td>
<td>Row 1 Cell 2</td>
</tr>
<tr>
<td>Row 2 Cell 1</td>
<td>Row 2 Cell 2</td>
</tr>
</tbody>
</table>
 The cellspacing attribute defines space between table cells.
HTML Forms
 <form> is just another kind of HTML tag
 HTML forms are used to create GUIs on Web pages
 Usually the purpose is to ask the user for information
 The information is then sent back to the server
 A form is an area that can contain form elements
 The syntax is:
<form parameters> ...form elements... </form>
 Form elements include: buttons, checkboxes, text fields,
radio buttons, drop-down menus, etc.
 Other kinds of HTML tags can be mixed in with the form elements
 A form usually contains a Submit button to send the
information in the form elements to the server.
The <form> tag
 The <form arguments> ... </form> tag encloses form elements
(and probably other HTML as well)
 The arguments to form tell what to do with the user input
 action="url" (required)
 Specifies where to send the data when the Submit button is clicked
 method="get" (default)
 Form data is sent as a URL with ?form_data info appended to the end
 Can be used only if data is all ASCII and not more than 100 characters
 method="post"
 Form data is sent in the body of the URL request
 target="target"
 Tells where to open the page sent as a result of the request
 target= _blank means open in a new window
 target= _top means use the same window
The <input> tag
 Most, but not all, form elements use the input tag, with a type="..."
argument to tell which kind of element it is
 type can be text, checkbox, radio, password, hidden, submit, reset, button,
file, or image
 Other common input tag arguments include:
 name: the name of the element
 value: the “value” of the element; used in different ways for different values
of type
 readonly: the value cannot be changed
 disabled: the user can’t do anything with this element
 Other arguments are defined for the input tag but have meaning only for
certain values of type
Text input
A text field:
<input type="text" name="textfield" value="with an initial value">
A multi-line text field:
<textarea name="textarea" cols="24" rows="2"></textarea>
A password field:
<input type="password" name="textfield3" value="secret">
Buttons
<div>A submit button:
<input type="submit" name="Submit" value="Submit">
</div>
<br>
<div>A reset button:
<input type="reset" name="Submit2" value="Reset">
</div>
<br>
<div>A plain button:
<input type="button" name="Submit3" value="Push Me">
</div>
 submit: send data
 reset: restore all form elements to
their initial state
 button: take some action as specified
by JavaScript
Checkboxes
A checkbox:
<input type="checkbox" name="checkbox” value="checkbox" checked>
 type: "checkbox"
 name: used to reference this form element from JavaScript
 value: value to be returned when element is checked
 Note that there is no text associated with the checkbox—you have to
supply text in the surrounding HTML
Radio buttons
Radio buttons:
<br>
<input type="radio" name="radiobutton" value="myValue1" checked>
Male
<br>
<input type="radio" name="radiobutton" value="myValue2" >
Female
 If two or more radio buttons have the same name, the user can only select one of
them at a time
 This is how you make a radio button “group”
 If you ask for the value of that name, you will get the value specified for the
selected radio button
 As with checkboxes, radio buttons do not contain any text
Drop-down menu
A menu:
<select name="select">
<option value="red">red</option>
<option value="green">green</option>
<option value="BLUE">blue</option>
</select>
 Additional arguments:
 size: the number of items visible in the list (default is "1")
 multiple: if set to "true", any number of items may be selected (default is
"false")
HTML Tables and Forms
Ad

More Related Content

What's hot (20)

Html basics
Html basicsHtml basics
Html basics
codegracer
 
HTML Basic
HTML BasicHTML Basic
HTML Basic
Pranita Talwatkar
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
Nisa Soomro
 
HTML
HTMLHTML
HTML
Shaza Abd Alwahab
 
HTML Table
HTML TableHTML Table
HTML Table
Rao Mubashar
 
Tables and Forms in HTML
Tables and Forms in HTMLTables and Forms in HTML
Tables and Forms in HTML
Marlon Jamera
 
Html Xhtml And Xml 3e Tutorial 6
Html Xhtml And Xml 3e Tutorial 6Html Xhtml And Xml 3e Tutorial 6
Html Xhtml And Xml 3e Tutorial 6
larsonsb
 
HTML 4.0
HTML 4.0HTML 4.0
HTML 4.0
Mohamed Elabnody
 
Html forms
Html formsHtml forms
Html forms
nobel mujuji
 
HTML frames and HTML forms
HTML frames and HTML formsHTML frames and HTML forms
HTML frames and HTML forms
Nadine Cruz
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms Tutorial
ProdigyView
 
[Basic HTML/CSS] 4. html - form tags
[Basic HTML/CSS] 4. html - form tags[Basic HTML/CSS] 4. html - form tags
[Basic HTML/CSS] 4. html - form tags
Hyejin Oh
 
html forms
html formshtml forms
html forms
ikram niaz
 
Web engineering - HTML Form
Web engineering -  HTML FormWeb engineering -  HTML Form
Web engineering - HTML Form
Nosheen Qamar
 
HTML5 - Forms
HTML5 - FormsHTML5 - Forms
HTML5 - Forms
tina1357
 
HTML Training Part1
HTML Training Part1HTML Training Part1
HTML Training Part1
than sare
 
Html form
Html formHtml form
Html form
Jaya Kumari
 
Computer language - Html forms
Computer language - Html formsComputer language - Html forms
Computer language - Html forms
Dr. I. Uma Maheswari Maheswari
 
Forms in html5
Forms in html5Forms in html5
Forms in html5
hrisi87
 
HTML and CSS part 2
HTML and CSS part 2HTML and CSS part 2
HTML and CSS part 2
Julie Iskander
 

Similar to HTML Tables and Forms (20)

Lect# 1 html part ii
Lect# 1 html part iiLect# 1 html part ii
Lect# 1 html part ii
MuhammadAbdulSattarC
 
FYBSC IT Web Programming Unit II Html 5 Tables, Forms and Media
FYBSC IT Web Programming Unit II  Html 5 Tables, Forms and MediaFYBSC IT Web Programming Unit II  Html 5 Tables, Forms and Media
FYBSC IT Web Programming Unit II Html 5 Tables, Forms and Media
Arti Parab Academics
 
Html&css lesson 2
Html&css lesson 2Html&css lesson 2
Html&css lesson 2
Long Vương
 
Html - Tables, Forms and Frames by Telerik Academy
Html - Tables, Forms and Frames by Telerik AcademyHtml - Tables, Forms and Frames by Telerik Academy
Html - Tables, Forms and Frames by Telerik Academy
Ognyan Penkov
 
Section1 HTML (part2) Web technology for b
Section1 HTML (part2) Web technology for bSection1 HTML (part2) Web technology for b
Section1 HTML (part2) Web technology for b
salmamontaser1
 
PPT-203105353-1.pdf
PPT-203105353-1.pdfPPT-203105353-1.pdf
PPT-203105353-1.pdf
PINTUCHAUHAN8
 
Web(chap2)
Web(chap2)Web(chap2)
Web(chap2)
Jafar Nesargi
 
html.pptx
html.pptxhtml.pptx
html.pptx
AnuragPandey285102
 
HtmlForms- basic HTML forms description.
HtmlForms- basic HTML forms description.HtmlForms- basic HTML forms description.
HtmlForms- basic HTML forms description.
MohammadRafsunIslam
 
11-html-forms.pptydy6rfyf6rrydyf6r6ryfydydyff
11-html-forms.pptydy6rfyf6rrydyf6r6ryfydydyff11-html-forms.pptydy6rfyf6rrydyf6r6ryfydydyff
11-html-forms.pptydy6rfyf6rrydyf6r6ryfydydyff
SooryaPrashanth1
 
WEB DEVELOPMENT EXERCISE-2 LAB NAIDU.ppt
WEB DEVELOPMENT EXERCISE-2 LAB NAIDU.pptWEB DEVELOPMENT EXERCISE-2 LAB NAIDU.ppt
WEB DEVELOPMENT EXERCISE-2 LAB NAIDU.ppt
naiduluckynarsapuram
 
Html
HtmlHtml
Html
baabtra.com - No. 1 supplier of quality freshers
 
Html Table
Html TableHtml Table
Html Table
nehashinde41
 
Intodcution to Html
Intodcution to HtmlIntodcution to Html
Intodcution to Html
Taha Malampatti
 
HYPERTEXT MARK UP LANGUAGES (HTML) FORMS
HYPERTEXT MARK UP LANGUAGES (HTML) FORMSHYPERTEXT MARK UP LANGUAGES (HTML) FORMS
HYPERTEXT MARK UP LANGUAGES (HTML) FORMS
RoselAAliganga
 
Forms and buttons
Forms and buttonsForms and buttons
Forms and buttons
cherrybear2014
 
Unit 2
Unit 2 Unit 2
Unit 2
Abhishek Kesharwani
 
Html Form Controls
Html Form ControlsHtml Form Controls
Html Form Controls
Bosco Technical Training Society, Don Bosco Technical School (Aff. GGSIP University, New Delhi)
 
11-html-forms.ppt
11-html-forms.ppt11-html-forms.ppt
11-html-forms.ppt
karansingh4126
 
Web forms and html lecture Number 4
Web forms and html lecture Number 4Web forms and html lecture Number 4
Web forms and html lecture Number 4
Mudasir Syed
 
FYBSC IT Web Programming Unit II Html 5 Tables, Forms and Media
FYBSC IT Web Programming Unit II  Html 5 Tables, Forms and MediaFYBSC IT Web Programming Unit II  Html 5 Tables, Forms and Media
FYBSC IT Web Programming Unit II Html 5 Tables, Forms and Media
Arti Parab Academics
 
Html - Tables, Forms and Frames by Telerik Academy
Html - Tables, Forms and Frames by Telerik AcademyHtml - Tables, Forms and Frames by Telerik Academy
Html - Tables, Forms and Frames by Telerik Academy
Ognyan Penkov
 
Section1 HTML (part2) Web technology for b
Section1 HTML (part2) Web technology for bSection1 HTML (part2) Web technology for b
Section1 HTML (part2) Web technology for b
salmamontaser1
 
HtmlForms- basic HTML forms description.
HtmlForms- basic HTML forms description.HtmlForms- basic HTML forms description.
HtmlForms- basic HTML forms description.
MohammadRafsunIslam
 
11-html-forms.pptydy6rfyf6rrydyf6r6ryfydydyff
11-html-forms.pptydy6rfyf6rrydyf6r6ryfydydyff11-html-forms.pptydy6rfyf6rrydyf6r6ryfydydyff
11-html-forms.pptydy6rfyf6rrydyf6r6ryfydydyff
SooryaPrashanth1
 
WEB DEVELOPMENT EXERCISE-2 LAB NAIDU.ppt
WEB DEVELOPMENT EXERCISE-2 LAB NAIDU.pptWEB DEVELOPMENT EXERCISE-2 LAB NAIDU.ppt
WEB DEVELOPMENT EXERCISE-2 LAB NAIDU.ppt
naiduluckynarsapuram
 
HYPERTEXT MARK UP LANGUAGES (HTML) FORMS
HYPERTEXT MARK UP LANGUAGES (HTML) FORMSHYPERTEXT MARK UP LANGUAGES (HTML) FORMS
HYPERTEXT MARK UP LANGUAGES (HTML) FORMS
RoselAAliganga
 
Web forms and html lecture Number 4
Web forms and html lecture Number 4Web forms and html lecture Number 4
Web forms and html lecture Number 4
Mudasir Syed
 
Ad

Recently uploaded (20)

Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptxANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
Mayuri Chavan
 
The History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptxThe History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
Cultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptxCultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptx
UmeshTimilsina1
 
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
antiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidenceantiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidence
PrachiSontakke5
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)
jemille6
 
2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx
mansk2
 
Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
Drugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdfDrugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdf
crewot855
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
Nguyen Thanh Tu Collection
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
Form View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo SlidesForm View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo Slides
Celine George
 
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Leonel Morgado
 
Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptxANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
Mayuri Chavan
 
Cultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptxCultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptx
UmeshTimilsina1
 
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
antiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidenceantiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidence
PrachiSontakke5
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)
jemille6
 
2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx
mansk2
 
Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
Drugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdfDrugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdf
crewot855
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
Nguyen Thanh Tu Collection
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
Form View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo SlidesForm View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo Slides
Celine George
 
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Leonel Morgado
 
Ad

HTML Tables and Forms

  • 1. DR. S. & S.S. GHANDHY GOVERNMENT ENGINEERING COLLEGE, SURAT A Presentation on subject W.T. (HTML Tables and Forms)
  • 2. PRESENTED BY : Prof J. J. Patel (Faculty Guide) Electronics & Communication Department Name Enrollment number Hinesh Miyani 180230111035 HTML Tables and Forms
  • 3. TOPICS TO BE DISCUSSED:  Introduction to HTML  HTML Tables  Spanning Multiple Rows and Cells  Cell Padding and Spacing  HTML Forms  HTML Form Attributes  HTML Form Elements  HTML Input Types and Attributes
  • 4. Introduction to HTML What is HTML?  HTML stands for Hyper Text Markup Language.  HTML is the standard markup language for creating Web pages.  HTML describes the structure of a Web page.  We can apply this markup language to web pages to display text, images, sound and movie files, and almost any other type of electronic information.  We use the language to format documents and link them together, regardless of the type of computer with which the file was originally created.
  • 5. HTML Tables  Tables represent tabular data  A table consists of one or several rows  Each row has one or more columns  Tables comprised of several core tags:  <table></table>: begin / end the table  <tr></tr>: create a table row  <td></td>: create tabular data (cell)  Tables should not be used for layout  Use CSS floats and positioning styles instead
  • 6. HTML Tables <table border="1"> <tr> <td>Row 1 Cell 1</td> <td>Row 1 Cell 2</td> </tr> <tr> <td>Row 2 Cell 1</td> <td>Row 2 Cell 2</td> </tr> </table>  Content is placed within tables cells. A table cell is defined by <td> and </td>.  The border attribute defines how wide the table's border will be.
  • 7. Table Heading <table border="1"> <thead> <th>Name</th> <th>Salary</th> </thead> <tbody> <tr> <td>Ramesh Shah</td> <td>5000</td> </tr> <tr> <td>Amit Bhaskar</td> <td>7000</td> </tr> </tbody> </table>  The <thead> tag is used to group header content in an HTML table.  The <tbody> tag is used to group the body content in an HTML table.  The <th> tag defines a header cell in an HTML table.
  • 8. Spanning Multiple Rows and Cells <table border="1"> <thead> <th>Column 1</th> <th>Column 2</th> <th>Column 3</th> </thead> <tbody> <tr> <td rowspan="2">Row 1 Cell 1</td> <td>Row 1 Cell 2</td> <td>Row 1 Cell 3</td> </tr> <tr> <td>Row 2 Cell 2</td> <td>Row 2 Cell 3</td> </tr> <tr> <td colspan="3">Row 3 Cell 1</td> </tr> </tbody> </table>  We will use colspan attribute if we want to merge two or more columns into a single column.  Similar way we will use rowspan if we want to merge two or more rows.
  • 9. Cell Padding and Spacing <table border="1" cellpadding="20"> <thead> <th>Column 1</th> <th>Column 2</th> </thead> <tbody> <tr> <td>Row 1 Cell 1</td> <td>Row 1 Cell 2</td> </tr> <tr> <td>Row 2 Cell 1</td> <td>Row 2 Cell 2</td> </tr> </tbody> </table>  There are two attributes called cellpadding and cellspacing which we will use to adjust the white space in our table cells.  The cellpadding represents the distance between cell borders and the content within a cell.
  • 10. Cell Padding and Spacing <table border="1" cellspacing="10"> <thead> <th>Column 1</th> <th>Column 2</th> </thead> <tbody> <tr> <td>Row 1 Cell 1</td> <td>Row 1 Cell 2</td> </tr> <tr> <td>Row 2 Cell 1</td> <td>Row 2 Cell 2</td> </tr> </tbody> </table>  The cellspacing attribute defines space between table cells.
  • 11. HTML Forms  <form> is just another kind of HTML tag  HTML forms are used to create GUIs on Web pages  Usually the purpose is to ask the user for information  The information is then sent back to the server  A form is an area that can contain form elements  The syntax is: <form parameters> ...form elements... </form>  Form elements include: buttons, checkboxes, text fields, radio buttons, drop-down menus, etc.  Other kinds of HTML tags can be mixed in with the form elements  A form usually contains a Submit button to send the information in the form elements to the server.
  • 12. The <form> tag  The <form arguments> ... </form> tag encloses form elements (and probably other HTML as well)  The arguments to form tell what to do with the user input  action="url" (required)  Specifies where to send the data when the Submit button is clicked  method="get" (default)  Form data is sent as a URL with ?form_data info appended to the end  Can be used only if data is all ASCII and not more than 100 characters  method="post"  Form data is sent in the body of the URL request  target="target"  Tells where to open the page sent as a result of the request  target= _blank means open in a new window  target= _top means use the same window
  • 13. The <input> tag  Most, but not all, form elements use the input tag, with a type="..." argument to tell which kind of element it is  type can be text, checkbox, radio, password, hidden, submit, reset, button, file, or image  Other common input tag arguments include:  name: the name of the element  value: the “value” of the element; used in different ways for different values of type  readonly: the value cannot be changed  disabled: the user can’t do anything with this element  Other arguments are defined for the input tag but have meaning only for certain values of type
  • 14. Text input A text field: <input type="text" name="textfield" value="with an initial value"> A multi-line text field: <textarea name="textarea" cols="24" rows="2"></textarea> A password field: <input type="password" name="textfield3" value="secret">
  • 15. Buttons <div>A submit button: <input type="submit" name="Submit" value="Submit"> </div> <br> <div>A reset button: <input type="reset" name="Submit2" value="Reset"> </div> <br> <div>A plain button: <input type="button" name="Submit3" value="Push Me"> </div>  submit: send data  reset: restore all form elements to their initial state  button: take some action as specified by JavaScript
  • 16. Checkboxes A checkbox: <input type="checkbox" name="checkbox” value="checkbox" checked>  type: "checkbox"  name: used to reference this form element from JavaScript  value: value to be returned when element is checked  Note that there is no text associated with the checkbox—you have to supply text in the surrounding HTML
  • 17. Radio buttons Radio buttons: <br> <input type="radio" name="radiobutton" value="myValue1" checked> Male <br> <input type="radio" name="radiobutton" value="myValue2" > Female  If two or more radio buttons have the same name, the user can only select one of them at a time  This is how you make a radio button “group”  If you ask for the value of that name, you will get the value specified for the selected radio button  As with checkboxes, radio buttons do not contain any text
  • 18. Drop-down menu A menu: <select name="select"> <option value="red">red</option> <option value="green">green</option> <option value="BLUE">blue</option> </select>  Additional arguments:  size: the number of items visible in the list (default is "1")  multiple: if set to "true", any number of items may be selected (default is "false")
  翻译: