SlideShare a Scribd company logo
1 of 10
HTML & CSS -LESSON 2 
IT Lecturerer: Ngo Dinh Cuong
HTML 
 HTML Tables: Tables are defined with the <table> tag. 
A table is divided into rows (with the <tr> tag), and each row is divided 
into data cells (with the <td> tag). td stands for "table data," and holds 
the content of a data cell. A <td> tag can contain text, links, images, 
lists, forms, other tables, etc. 
<!DOCTYPE html> 
<html> 
<body> 
<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> 
</body> 
</html>
HTML Editor 
 HTML Table Headers: Header information in a table are defined with 
the <th> tag. All major browsers display the text in the <th> element as 
bold and centered. 
<!DOCTYPE html> 
<html> 
<body> 
<table border="1"> 
<tr> 
<th>Header 1</th> 
<th>Header 2</th> 
</tr> 
<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> 
</body> 
</html>
HTML Editor 
 HTML Forms: HTML forms are used to pass data to a server. 
An HTML form can contain input elements like text fields, checkboxes, 
radio-buttons, submit buttons and more. A form can also contain select 
lists, textarea, fieldset, legend, and label elements. 
<!DOCTYPE html> 
<html> 
<body> 
<form> 
. 
input elements 
. 
</form> 
</body> 
</html>
HTML Editor 
 Text Fields: <input type="text"> defines a one-line input field that a 
user can enter text into: 
<!DOCTYPE html> 
<html> 
<body> 
<form> 
First name: <input type="text" name="firstname"><br> 
Last name: <input type="text" name="lastname"> 
</form> 
</html> 
 Password Field: <input type="password"> defines a password field: 
<!DOCTYPE html> 
<html> 
<body> 
<form> 
Password: <input type="password" name="pwd"> 
</form> 
</html>
HTML Editor 
 Radio Buttons: <input type="radio"> defines a radio button. Radio 
buttons let a user select ONLY ONE of a limited number of choices: 
<!DOCTYPE html> 
<html> 
<body> 
<form> 
<input type="radio" name="sex" value="male">Male</br> 
<input type="radio" name="sex" value="female">Female 
</form> 
</html> 
 Checkboxes: <input type="checkbox"> defines a checkbox. 
Checkboxes let a user select ZERO or MORE options of a limited 
number of choices. 
<form> 
<input type="checkbox" name="vehicle" value="Bike">I have a bike<br> 
<input type="checkbox" name="vehicle" value="Car">I have a car 
</form>
HTML Editor 
 Submit Button: <input type="submit"> defines a submit button. 
A submit button is used to send form data to a server. The data is sent 
to the page specified in the form's action attribute. The file defined in 
the action attribute usually does something with the received input: 
<!DOCTYPE html> 
<html> 
<body> 
<form name=“frm_login" action="html_form_action.php" 
method="get"> 
Username: <input type="text" name="user"> 
<input type="submit" value="Submit"> 
</form> 
</html>
HTML Editor 
 Select tag: Create a drop-down list with four options: 
<!DOCTYPE html> 
<html> 
<body> 
<form> 
<select> 
<option value="volvo">Volvo</option> 
<option value="saab">Saab</option> 
<option value="mercedes">Mercedes</option> 
<option value="audi">Audi</option> 
</select> 
</form> 
</html>
HTML Editor 
 Textarea tag: 
<!DOCTYPE html> 
<html> 
<body> 
<form> 
<textarea rows="4" cols="50"> 
Don’t write your name on sand, waves will wash it way 
Don’t write your name in sky, wind may blow it away 
Write your name in hearts of people you come in touch with. That’s where it 
will stay 
</textarea> 
</form> 
</html>
Practice

More Related Content

What's hot

HTML (Hyper Text Markup Language)
HTML (Hyper Text Markup Language)HTML (Hyper Text Markup Language)
HTML (Hyper Text Markup Language)Jishan Ali
 
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 MukeshMukesh Kumar
 
basic knowledge abot html
basic knowledge abot htmlbasic knowledge abot html
basic knowledge abot htmlAnkit Dubey
 
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 MediaArti Parab Academics
 
Web app development_html_02
Web app development_html_02Web app development_html_02
Web app development_html_02Hassen Poreya
 
FYBSC IT Web Programming Unit I HTML 5 & andcss
FYBSC IT Web Programming Unit I HTML 5 & andcssFYBSC IT Web Programming Unit I HTML 5 & andcss
FYBSC IT Web Programming Unit I HTML 5 & andcssArti Parab Academics
 
HTML [Basic] --by Abdulla-al Baset
HTML [Basic] --by Abdulla-al BasetHTML [Basic] --by Abdulla-al Baset
HTML [Basic] --by Abdulla-al BasetAbdulla-al Baset
 
Web design - Working with tables in HTML
Web design - Working with tables in HTMLWeb design - Working with tables in HTML
Web design - Working with tables in HTMLMustafa Kamel Mohammadi
 
HTML 5 Tables and Forms
HTML 5 Tables and FormsHTML 5 Tables and Forms
HTML 5 Tables and FormsDoncho Minkov
 
Adding tables to your web page
Adding tables to your web pageAdding tables to your web page
Adding tables to your web pagecachs_computing
 
Frames tables forms
Frames tables formsFrames tables forms
Frames tables formsnobel mujuji
 
Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)club23
 
Getting Information through HTML Forms
Getting Information through HTML FormsGetting Information through HTML Forms
Getting Information through HTML FormsMike Crabb
 

What's hot (20)

html-table
html-tablehtml-table
html-table
 
HTML: Tables and Forms
HTML: Tables and FormsHTML: Tables and Forms
HTML: Tables and Forms
 
HTML (Hyper Text Markup Language)
HTML (Hyper Text Markup Language)HTML (Hyper Text Markup Language)
HTML (Hyper Text Markup Language)
 
HTML Table Tags
HTML Table TagsHTML Table Tags
HTML Table Tags
 
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
 
basic knowledge abot html
basic knowledge abot htmlbasic knowledge abot html
basic knowledge abot html
 
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
 
Web app development_html_02
Web app development_html_02Web app development_html_02
Web app development_html_02
 
FYBSC IT Web Programming Unit I HTML 5 & andcss
FYBSC IT Web Programming Unit I HTML 5 & andcssFYBSC IT Web Programming Unit I HTML 5 & andcss
FYBSC IT Web Programming Unit I HTML 5 & andcss
 
HTML [Basic] --by Abdulla-al Baset
HTML [Basic] --by Abdulla-al BasetHTML [Basic] --by Abdulla-al Baset
HTML [Basic] --by Abdulla-al Baset
 
Web design - Working with tables in HTML
Web design - Working with tables in HTMLWeb design - Working with tables in HTML
Web design - Working with tables in HTML
 
Html ppt
Html pptHtml ppt
Html ppt
 
HTML
HTMLHTML
HTML
 
HTML 5 Tables and Forms
HTML 5 Tables and FormsHTML 5 Tables and Forms
HTML 5 Tables and Forms
 
Adding tables to your web page
Adding tables to your web pageAdding tables to your web page
Adding tables to your web page
 
Frames tables forms
Frames tables formsFrames tables forms
Frames tables forms
 
Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)
 
HTML 4.0
HTML 4.0HTML 4.0
HTML 4.0
 
Getting Information through HTML Forms
Getting Information through HTML FormsGetting Information through HTML Forms
Getting Information through HTML Forms
 
HTML Tags
HTML TagsHTML Tags
HTML Tags
 

Viewers also liked

Romeo santos power
Romeo santos powerRomeo santos power
Romeo santos powerevebo
 
Ch 6 blood and the lymphatic and immune
Ch 6 blood and the lymphatic and immuneCh 6 blood and the lymphatic and immune
Ch 6 blood and the lymphatic and immunemariaochoa823
 
Adobe action script 3.0 programming
Adobe   action script 3.0 programmingAdobe   action script 3.0 programming
Adobe action script 3.0 programmingDaniel Ramos
 
Bai 5,6 hai hinh bang nhau và phep vi tu
Bai 5,6 hai hinh bang nhau và phep vi tuBai 5,6 hai hinh bang nhau và phep vi tu
Bai 5,6 hai hinh bang nhau và phep vi tuLe Hanh
 
Budidaya padi organik dengan sistem sri
Budidaya padi organik dengan sistem sriBudidaya padi organik dengan sistem sri
Budidaya padi organik dengan sistem sriLaksamana Indra
 
praktikum kultur jaringan sterilisasi peralatan
praktikum kultur jaringan sterilisasi peralatanpraktikum kultur jaringan sterilisasi peralatan
praktikum kultur jaringan sterilisasi peralatanLaksamana Indra
 
Bai 3 phep doi xung truc
Bai 3 phep doi xung trucBai 3 phep doi xung truc
Bai 3 phep doi xung trucLe Hanh
 
Scr (silicon controlled rectrifier) (2)
Scr (silicon controlled rectrifier) (2)Scr (silicon controlled rectrifier) (2)
Scr (silicon controlled rectrifier) (2)Adi Setiadi
 
Ch 7 Respiratory System Drugs
Ch 7 Respiratory System DrugsCh 7 Respiratory System Drugs
Ch 7 Respiratory System Drugsmariaochoa823
 

Viewers also liked (16)

Prewiev
PrewievPrewiev
Prewiev
 
Prewiev
PrewievPrewiev
Prewiev
 
Prewiev
PrewievPrewiev
Prewiev
 
Romeo santos power
Romeo santos powerRomeo santos power
Romeo santos power
 
Ch 6 blood and the lymphatic and immune
Ch 6 blood and the lymphatic and immuneCh 6 blood and the lymphatic and immune
Ch 6 blood and the lymphatic and immune
 
Prewiev
PrewievPrewiev
Prewiev
 
Adobe action script 3.0 programming
Adobe   action script 3.0 programmingAdobe   action script 3.0 programming
Adobe action script 3.0 programming
 
Web 3.0
Web 3.0Web 3.0
Web 3.0
 
Bai 5,6 hai hinh bang nhau và phep vi tu
Bai 5,6 hai hinh bang nhau và phep vi tuBai 5,6 hai hinh bang nhau và phep vi tu
Bai 5,6 hai hinh bang nhau và phep vi tu
 
Geografi
GeografiGeografi
Geografi
 
10 a ochoa
10 a ochoa10 a ochoa
10 a ochoa
 
Budidaya padi organik dengan sistem sri
Budidaya padi organik dengan sistem sriBudidaya padi organik dengan sistem sri
Budidaya padi organik dengan sistem sri
 
praktikum kultur jaringan sterilisasi peralatan
praktikum kultur jaringan sterilisasi peralatanpraktikum kultur jaringan sterilisasi peralatan
praktikum kultur jaringan sterilisasi peralatan
 
Bai 3 phep doi xung truc
Bai 3 phep doi xung trucBai 3 phep doi xung truc
Bai 3 phep doi xung truc
 
Scr (silicon controlled rectrifier) (2)
Scr (silicon controlled rectrifier) (2)Scr (silicon controlled rectrifier) (2)
Scr (silicon controlled rectrifier) (2)
 
Ch 7 Respiratory System Drugs
Ch 7 Respiratory System DrugsCh 7 Respiratory System Drugs
Ch 7 Respiratory System Drugs
 

Similar to HTML & CSS Lesson 2 Tables Forms Select Textarea

Similar to HTML & CSS Lesson 2 Tables Forms Select Textarea (20)

HTML Tables and Forms
HTML Tables and Forms HTML Tables and Forms
HTML Tables and Forms
 
Lect# 1 html part ii
Lect# 1 html part iiLect# 1 html part ii
Lect# 1 html part ii
 
PPT-203105353-1.pdf
PPT-203105353-1.pdfPPT-203105353-1.pdf
PPT-203105353-1.pdf
 
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
 
Intodcution to Html
Intodcution to HtmlIntodcution to Html
Intodcution to Html
 
Practicals it
Practicals itPracticals it
Practicals it
 
HTML.pptx
HTML.pptxHTML.pptx
HTML.pptx
 
Unit 2
Unit 2 Unit 2
Unit 2
 
Unit 2
Unit 2 Unit 2
Unit 2
 
utsav1.pptxjxnclbshjdcn;kJDucbnsD>NVzljfbmlzl
utsav1.pptxjxnclbshjdcn;kJDucbnsD>NVzljfbmlzlutsav1.pptxjxnclbshjdcn;kJDucbnsD>NVzljfbmlzl
utsav1.pptxjxnclbshjdcn;kJDucbnsD>NVzljfbmlzl
 
Html.pptx
Html.pptxHtml.pptx
Html.pptx
 
Tables and their padding in HTML etc.pptx
Tables and their padding in HTML etc.pptxTables and their padding in HTML etc.pptx
Tables and their padding in HTML etc.pptx
 
Web Developement Workshop (Oct 2009 -Day 1)
Web Developement Workshop (Oct 2009 -Day 1)Web Developement Workshop (Oct 2009 -Day 1)
Web Developement Workshop (Oct 2009 -Day 1)
 
Designing web pages html forms and input
Designing web pages html  forms and inputDesigning web pages html  forms and input
Designing web pages html forms and input
 
Html
HtmlHtml
Html
 
Html tables examples
Html tables   examplesHtml tables   examples
Html tables examples
 
01 HTML-Tables-1.pptx
01 HTML-Tables-1.pptx01 HTML-Tables-1.pptx
01 HTML-Tables-1.pptx
 
html.pptx
html.pptxhtml.pptx
html.pptx
 
Full Stack Class in Marathahalli| AchieversIT
Full Stack Class in Marathahalli| AchieversITFull Stack Class in Marathahalli| AchieversIT
Full Stack Class in Marathahalli| AchieversIT
 
HTML Notes For demo_classes.pdf
HTML Notes For demo_classes.pdfHTML Notes For demo_classes.pdf
HTML Notes For demo_classes.pdf
 

HTML & CSS Lesson 2 Tables Forms Select Textarea

  • 1. HTML & CSS -LESSON 2 IT Lecturerer: Ngo Dinh Cuong
  • 2. HTML  HTML Tables: Tables are defined with the <table> tag. A table is divided into rows (with the <tr> tag), and each row is divided into data cells (with the <td> tag). td stands for "table data," and holds the content of a data cell. A <td> tag can contain text, links, images, lists, forms, other tables, etc. <!DOCTYPE html> <html> <body> <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> </body> </html>
  • 3. HTML Editor  HTML Table Headers: Header information in a table are defined with the <th> tag. All major browsers display the text in the <th> element as bold and centered. <!DOCTYPE html> <html> <body> <table border="1"> <tr> <th>Header 1</th> <th>Header 2</th> </tr> <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> </body> </html>
  • 4. HTML Editor  HTML Forms: HTML forms are used to pass data to a server. An HTML form can contain input elements like text fields, checkboxes, radio-buttons, submit buttons and more. A form can also contain select lists, textarea, fieldset, legend, and label elements. <!DOCTYPE html> <html> <body> <form> . input elements . </form> </body> </html>
  • 5. HTML Editor  Text Fields: <input type="text"> defines a one-line input field that a user can enter text into: <!DOCTYPE html> <html> <body> <form> First name: <input type="text" name="firstname"><br> Last name: <input type="text" name="lastname"> </form> </html>  Password Field: <input type="password"> defines a password field: <!DOCTYPE html> <html> <body> <form> Password: <input type="password" name="pwd"> </form> </html>
  • 6. HTML Editor  Radio Buttons: <input type="radio"> defines a radio button. Radio buttons let a user select ONLY ONE of a limited number of choices: <!DOCTYPE html> <html> <body> <form> <input type="radio" name="sex" value="male">Male</br> <input type="radio" name="sex" value="female">Female </form> </html>  Checkboxes: <input type="checkbox"> defines a checkbox. Checkboxes let a user select ZERO or MORE options of a limited number of choices. <form> <input type="checkbox" name="vehicle" value="Bike">I have a bike<br> <input type="checkbox" name="vehicle" value="Car">I have a car </form>
  • 7. HTML Editor  Submit Button: <input type="submit"> defines a submit button. A submit button is used to send form data to a server. The data is sent to the page specified in the form's action attribute. The file defined in the action attribute usually does something with the received input: <!DOCTYPE html> <html> <body> <form name=“frm_login" action="html_form_action.php" method="get"> Username: <input type="text" name="user"> <input type="submit" value="Submit"> </form> </html>
  • 8. HTML Editor  Select tag: Create a drop-down list with four options: <!DOCTYPE html> <html> <body> <form> <select> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="mercedes">Mercedes</option> <option value="audi">Audi</option> </select> </form> </html>
  • 9. HTML Editor  Textarea tag: <!DOCTYPE html> <html> <body> <form> <textarea rows="4" cols="50"> Don’t write your name on sand, waves will wash it way Don’t write your name in sky, wind may blow it away Write your name in hearts of people you come in touch with. That’s where it will stay </textarea> </form> </html>