SlideShare a Scribd company logo
1 of 58
HTML 5 – Tables, Forms
and Frames
Doncho Minkov
Technical Trainer
http://minkov.it
Telerik Web Design Course
html5course.telerik.com
Contents
 HTML Tables

 Simple Tables

 Complete HTML 5 Tables
 Data cells and Header cells
 Nested Tables
 Complex tables

 Cells Width

 Cell Spacing and Padding
 Column and Row Span
2
Contents (2)
 HTML Forms

 Form Fields and Fieldsets
 Text boxes
 Buttons
 Checkboxes and Radio Buttons
 Select fields
 Hidden fields

 Sliders and Spinboxes
 Validation fields
3
Contents (3)
 HTML Frames

 Frame and Noframe tags
 IFrames

4
HTML Tables
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
Simple HTML Tables – Example
<table cellspacing="0" cellpadding="5">
<tr>
<td><img src="ppt.gif"></td>
<td><a href="lecture1.ppt">Lecture 1</a></td>
</tr>
<tr>
<td><img src="ppt.gif"></td>
<td><a href="lecture2.ppt">Lecture 2</a></td>
</tr>
<tr>
<td><img src="zip.gif"></td>
<td><a href="lecture2-demos.zip">
Lecture 2 - Demos</a></td>
</tr>
</table>
7
Simple HTML Tables
Live Demo
Data Cells and Header Cells
 Two kinds of cells in HTML 5 tables

 Data cells – containing the table data
 Header cells – used for the column names or
some more important cells in a table
 Why two kinds of cells?

 Used to semantically separate the cells
<tr>

<th>Full name</th> <th> Mark </th>
</tr>
<tr>
<td>Doncho Minkov</td> <td>Very good 5</td>
</tr>
<tr>
<td>Georgi Georgiev</td> <td>Exellent 6</td>
</tr>
Data and Header Cells
Live Demo

10
Complete
HTML 5 Tables
With Header, Footer
and Body

11
Complete HTML Tables
 Table rows

split into three semantic sections:
header, body and footer
 <thead> denotes table header and contains
<th> elements, instead of <td> elements
 <tbody> denotes collection of table rows that
contain the very data
 <tfoot> denotes table footer but comes
BEFORE the <tbody> tag
 <colgroup> and <col> define columns (used
to set column widths)
12
Complete HTML Table: Example
<table>
columns
<colgroup>
<col style="width:100px" /><col />
</colgroup>
th
header
<thead>
<tr><th>Column 1</th><th>Column 2</th></tr>
</thead>
footer
<tfoot>
<tr><td>Footer 1</td><td>Footer 2</td></tr>
</tfoot>
Last comes the body (data)
<tbody>
<tr><td>Cell 1.1</td><td>Cell 1.2</td></tr>
<tr><td>Cell 2.1</td><td>Cell 2.2</td></tr>
</tbody>
</table>
13
Complete HTML Table:
Example (2)
<table>
table-full.html
<colgroup>
<col style="width:200px" /><col />
</colgroup>
<thead>
<tr><th>Column 1</th><th>Column 2</th></tr>
</thead>
<tfoot>
<tr><td>Footer 1</td><td>Footer 2</td></tr>
</tfoot>
<tbody>
Although the footer is
<tr><td>Cell 1.1</td><td>Cell 1.2</td></tr>
<tr><td>Cellbefore the data in the
2.1</td><td>Cell 2.2</td></tr>
</tbody>
code, it is displayed last
</table>
14
Complete HTML 5 Tables
Live Demo

15
Nested Tables
Tables in Tables in Tables in Tables…

16
Nested Tables


Table "cells" (<td>) can contain nested tables
(tables within tables):
<table>
<tr>
<td>Contact:</td>
<td>
<table>
<tr>
<td>First Name</td>
<td>Last Name</td>
</tr>
</table>
</td>
</tr>
</table>

nested-tables.html

17
Nested Tables
Live Demo
Complex Tables
With Padding, Spacing and Stuff
Cell Spacing and Padding
 Tables have two attributes
 cellspacing

related to space

 cellpadding

cell

cell

cell

cell


cell
cell

cell

cell

Defines the
empty space
between cells



Defines the empty
space around the cell
content
20
table-cells.html

Cell Spacing and Padding –
Example

<html>
<head><title>Table Cells</title></head>
<body>
<table cellspacing="15" cellpadding="0">
<tr><td>First</td>
<td>Second</td></tr>
</table>
<br/>
<table cellspacing="0" cellpadding="10">
<tr><td>First</td><td>Second</td></tr>
</table>
</body>
</html>

21
table-cells.html

Cell Spacing and Padding –
Example (2)

<html>
<head><title>Table Cells</title></head>
<body>
<table cellspacing="15" cellpadding="0">
<tr><td>First</td>
<td>Second</td></tr>
</table>
<br/>
<table cellspacing="0" cellpadding="10">
<tr><td>First</td><td>Second</td></tr>
</table>
</body>
</html>

22
Table Cell Spacing
and Cell Padding
Live Demo
Row and Column
Spans
How to make a two-cells
column? Or row?
Column and Row Span
 Cells have two attributes


colspan

colspan="1"

cell[1,1]

related to merging


colspan="1"

rowspan

rowspan="2"

rowspan="1"
cell[1,2]

cell[1,2]
cell[1,1]

cell[2,1]

cell[2,1]

rowspan="1"

colspan="2"


Defines how
many columns
the cell occupies



Defines how
many rows the
cell occupies
25
Column and Row Span –
Example

table-colspan-rowspan.html

<table cellspacing="0">
<tr class="1"><td>Cell[1,1]</td>
<td colspan="2">Cell[2,1]</td></tr>
<tr class="2"><td>Cell[1,2]</td>
<td rowspan="2">Cell[2,2]</td>
<td>Cell[3,2]</td></tr>
<tr class="3"><td>Cell[1,3]</td>
<td>Cell[2,3]</td></tr>
</table>

26
Column and Row Span –
Example (2)
table-colspan-rowspan.html
<table cellspacing="0">
<tr class="1"><td>Cell[1,1]</td>
<td colspan="2">Cell[2,1]</td></tr>
<tr class="2"><td>Cell[1,2]</td>
<td rowspan="2">Cell[2,2]</td>
<td>Cell[3,2]</td></tr>
<tr class="3"><td>Cell[1,3]</td>
Cell[1,1]
Cell[2,1]
<td>Cell[2,3]</td></tr>
</table>

Cell[1,2]

Cell[3,2]
Cell[2,2]

Cell[1,3]

Cell[2,3]

27
Row and Columns
Spans
Live Demo

28
HTML 5 Forms
Entering User Data from a Web Page
What are HTML 5 Forms?
 The primary

method for gathering data from

site visitors
 HTML 5 Forms can contain

 Text fields for the user to type
 Buttons for interactions like "Register", "Login",
"Search"
 Menus, Sliders, etc…
 Check Google, Yahoo, Facebook

 Google search field is a simple Text field
30
How to Create Forms?
 Create a form block with
<form></form>

 Example:

The "method" attribute tells how
the form data should be sent –
via GET or POST request

<form name="myForm" method="post"
action="path/to/some-script.php">
...
</form>

The "action" attribute tells where
the form data should be sent

31
Text Fields


Single-line text input fields:
<input type="text" name="FirstName" value="This
is a text field" />



Multi-line text input fields (textarea):
<textarea name="Comments">This is a multi-line
text field</textarea>



Password input – a text field which masks the
entered text with * signs
<input type="password" name="pass" />

32
Buttons


Reset button – brings the form to its initial state
<input type="reset" name="resetBtn"
value="Reset the form" />



Submit button:
<input type="submit" value="Apply Now" />



Image button – acts like submit but image is
displayed and click coordinates are sent
<input type="image" src="submit.gif"
name="submitBtn" alt="Submit" />



Ordinary button – no default action, used with JS
<input type="button" value="click me" />
33
Checkboxes and Radio Buttons


Checkboxes:
<input type="checkbox" name="fruit"
value="apple" />



Radio buttons:
<input type="radio" name="title" value="Mr." />



Radio buttons can be grouped, allowing only one
to be selected from a group:
<input type="radio" name="city" value="Lom" />
<input type="radio" name="city" value="Ruse" />
34
Select Fields
 Dropdown menus:

<select name="gender">
<option value="Value 1"
selected="selected">Male</option>
<option value="Value 2">Female</option>
<option value="Value 3">Other</option>
</select>
 Multiple-choice menus

<select name="products" multiple="multiple">
<option value="Value 1"
selected="selected">keyboard</option>
<option value="Value 2">mouse</option>
</select>
35
Hidden Fields



Hidden fields contain invisible data
<input type="hidden" name="Account" value="This
is a hidden text field" />

 Not shown to the user
 Used by JavaScript and server-side code
 ViewState, SessionState, etc..

36
Labels


Labels are used to associate an explanatory text
to a form field using the field's ID.
<label for="fn">First Name</label>
<input type="text" id="fn" />



Clicking on a label focuses its associated field
(checkboxes are toggled, radio buttons are
checked)



Labels are both a usability and accessibility
feature and are required in order to pass
accessibility validation.
37
Fieldsets


Fieldsets are used to enclose a group of related
form fields:
<form method="post" action="form.aspx">
<fieldset>
<legend>Client Details</legend>
<input type="text" id="Name" />
<input type="text" id="Phone" />
</fieldset>
<fieldset>
<legend>Order Details</legend>
<input type="text" id="Quantity" />
<textarea cols="40" rows="10"
id="Remarks"></textarea>
</fieldset>
</form>



The <legend> is the fieldset's title.
38
HTML 5 Forms
Inputs Fields
Live Demo

39
Sliders and Spinboxes
Lets make it spin
Range and Spinbox
 Restricts users to enter only

numbers

 Additional attributes min, max and step and
value
 Can become Spinbox or Slider, depending on
the input type
<input type="range" min="0" max="100" />
<input type="number" min="0" max="100" />

 Have some differences on different browsers

 Sliders and Spinboxes do not work on Firefox
 Shown as regular textboxes
41
Sliders and Spinboxes
Live Demo

42
Attributes from HTML 5


Autocomplete
 The browser stores the previously typed values
 Brings them back on a later visit on the same
page



Autofocus
 The field becomes on focus on page load



Required

 The field is required to be filled/selected
43
Input Fields with Validation
 Email – provides a simple validation

for email

 Can be passed a pattern for validation
 On a mobile device brings the email keyboard
<input type="email" required="true"
pattern="[^ @]*@[^ @].[^ @]"/>

 URL – has validation

for url

 On a mobile device brings the url keyboard
<input type="url" required="true" />

 Telephone

 Brings the numbers keyboard
<input type="tel" required="true" />
44
HTML Forms Validation
Live Demo

45
TabIndex
 The tabindex HTML attribute

controls the
order in which form fields and hyperlinks are
focused when repeatedly pressing the TAB key
 tabindex="0" (zero) - "natural" order
 If X < Y, then elements with tabindex="X" are
iterated before elements with tabindex="Y"
 Elements with negative tabindex are skipped,
however, this is not defined in the standard
<input type="text" tabindex="10" />
46
Tab Index
Live Demo

47
HTML Frames
<frameset>, <frame> and <iframe>
HTML Frames
 Frames provide a way to show multiple HTML

documents in a single Web page
 The page can be split into separate

views

(frames) horizontally and vertically
 Frames were popular in the early ages of HTML

development, but now their usage is rejected
 Frames are not supported by all user agents

(browsers, search engines, etc.)
 A <noframes> element is used to provide
content for non-compatible agents.
49
HTML Frames – Demo
frames.html
<html>
<head><title>Frames Example</title></head>

<frameset cols="180px,*,150px">
<frame src="left.html" />
<frame src="middle.html" />
<frame src="right.html" />
</frameset>
</html>



Note the target attribute applied to the
<a> elements in the left frame.
50
Inline Frames: <iframe>
 Inline frames provide a way to show one

website inside another website:
iframe-demo.html
<iframe name="iframeGoogle" width="600" height="400"
src="http://www.google.com" frameborder="yes"
scrolling="yes"></iframe>

51
HTML – Tables and Forms

Questions?

http://academy.telerik.com
Homework
1.

Create Web Pages like the following using
tables:

2.

Create a Web Page
like the following
using forms:
53
Homework (2)
3.

Create a Web form
that looks like this
sample:

54
Homework (3)
4.

Create a Calculator-like table.
You should use a HTML 5
form for the Calculator
 Buttons for all the numbers
and operators (+, -, etc.)

 Textbox for the result
 Do not make the same styles
as the example.

55
Homework (4)
5.

Create the following using tables and forms:

56
Homework (5)
6.

Construct the following Grid component:

 Try to make a HTML page, that looks just like the
example
 Not required to style for the homework
57
Homework (7)
7.

Create the following HTML 5 Page
 Hint: Use Fieldsets and Nested tables

58

More Related Content

What's hot (20)

Html ppt
Html pptHtml ppt
Html ppt
 
Html basics
Html basicsHtml basics
Html basics
 
html5.ppt
html5.ppthtml5.ppt
html5.ppt
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
 
CSS
CSSCSS
CSS
 
HTML practical file
HTML practical fileHTML practical file
HTML practical file
 
Bootstrap 4 ppt
Bootstrap 4 pptBootstrap 4 ppt
Bootstrap 4 ppt
 
An Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java ScriptAn Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java Script
 
JavaScript & Dom Manipulation
JavaScript & Dom ManipulationJavaScript & Dom Manipulation
JavaScript & Dom Manipulation
 
CSS for Beginners
CSS for BeginnersCSS for Beginners
CSS for Beginners
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
 
CSS framework By Palash
CSS framework By PalashCSS framework By Palash
CSS framework By Palash
 
CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout
 
HTML (Web) basics for a beginner
HTML (Web) basics for a beginnerHTML (Web) basics for a beginner
HTML (Web) basics for a beginner
 
Javascript 101
Javascript 101Javascript 101
Javascript 101
 
Basic-CSS-tutorial
Basic-CSS-tutorialBasic-CSS-tutorial
Basic-CSS-tutorial
 
Intro to HTML and CSS basics
Intro to HTML and CSS basicsIntro to HTML and CSS basics
Intro to HTML and CSS basics
 
Javascript essentials
Javascript essentialsJavascript essentials
Javascript essentials
 
(Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS (Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS
 

Viewers also liked

Viewers also liked (20)

Html tables, forms and audio video
Html tables, forms and audio videoHtml tables, forms and audio video
Html tables, forms and audio video
 
Html frames
Html framesHtml frames
Html frames
 
Tables and forms with HTML, CSS
Tables and forms with HTML, CSS  Tables and forms with HTML, CSS
Tables and forms with HTML, CSS
 
Frames tables forms
Frames tables formsFrames tables forms
Frames tables forms
 
JavaScript Operators
JavaScript OperatorsJavaScript Operators
JavaScript Operators
 
Introdution to HTML 5
Introdution to HTML 5Introdution to HTML 5
Introdution to HTML 5
 
Html 5
Html 5Html 5
Html 5
 
An Introduction to HTML5
An Introduction to HTML5An Introduction to HTML5
An Introduction to HTML5
 
COTS V Model
COTS V ModelCOTS V Model
COTS V Model
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
 
JavaScript: Operators and Expressions
JavaScript: Operators and ExpressionsJavaScript: Operators and Expressions
JavaScript: Operators and Expressions
 
HTML/HTML5
HTML/HTML5HTML/HTML5
HTML/HTML5
 
Arrays in PHP
Arrays in PHPArrays in PHP
Arrays in PHP
 
Html5 intro
Html5 introHtml5 intro
Html5 intro
 
JavaScript: Events Handling
JavaScript: Events HandlingJavaScript: Events Handling
JavaScript: Events Handling
 
Basic JavaScript Tutorial
Basic JavaScript TutorialBasic JavaScript Tutorial
Basic JavaScript Tutorial
 
PHP & MySQL 教學
PHP & MySQL 教學PHP & MySQL 教學
PHP & MySQL 教學
 
Sessions and cookies
Sessions and cookiesSessions and cookies
Sessions and cookies
 
The Future of CSS Layout
The Future of CSS LayoutThe Future of CSS Layout
The Future of CSS Layout
 
Javascript
JavascriptJavascript
Javascript
 

Similar to Html 5-tables-forms-frames (1)

Similar to Html 5-tables-forms-frames (1) (20)

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
 
Lect# 1 html part ii
Lect# 1 html part iiLect# 1 html part ii
Lect# 1 html part ii
 
HTML Tables and Forms
HTML Tables and Forms HTML Tables and Forms
HTML Tables and Forms
 
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
 
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
 
Html&css lesson 2
Html&css lesson 2Html&css lesson 2
Html&css lesson 2
 
HTML 5 Tables and Forms
HTML 5 Tables and FormsHTML 5 Tables and Forms
HTML 5 Tables and Forms
 
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
 
PPT-203105353-1.pdf
PPT-203105353-1.pdfPPT-203105353-1.pdf
PPT-203105353-1.pdf
 
Intodcution to Html
Intodcution to HtmlIntodcution to Html
Intodcution to Html
 
Html class-04
Html class-04Html class-04
Html class-04
 
table html web programing
table  html  web programingtable  html  web programing
table html web programing
 
RDBMS oracle function RDBMSRDBMSRDBMS.pptx
RDBMS oracle function RDBMSRDBMSRDBMS.pptxRDBMS oracle function RDBMSRDBMSRDBMS.pptx
RDBMS oracle function RDBMSRDBMSRDBMS.pptx
 
html.pptx
html.pptxhtml.pptx
html.pptx
 
Table and Form HTML&CSS
Table and Form HTML&CSSTable and Form HTML&CSS
Table and Form HTML&CSS
 
HTML 4.0
HTML 4.0HTML 4.0
HTML 4.0
 
HTML Basic
HTML BasicHTML Basic
HTML Basic
 
04. session 04 working withformsandframes
04. session 04   working withformsandframes04. session 04   working withformsandframes
04. session 04 working withformsandframes
 
HTML
HTML HTML
HTML
 

More from club23

Ms office word 2007
Ms office word 2007Ms office word 2007
Ms office word 2007club23
 
кои сме ние
кои сме ниекои сме ние
кои сме ниеclub23
 
компания2
компания2компания2
компания2club23
 
използване на специализирани програми за получаване и изпращане на файлове в ...
използване на специализирани програми за получаване и изпращане на файлове в ...използване на специализирани програми за получаване и изпращане на файлове в ...
използване на специализирани програми за получаване и изпращане на файлове в ...club23
 
Project 1 challenge
Project 1   challenge Project 1   challenge
Project 1 challenge club23
 
Project 1 module 3 -9kl
Project 1   module 3 -9klProject 1   module 3 -9kl
Project 1 module 3 -9klclub23
 
Project 1 module 2-9kl
Project 1   module 2-9klProject 1   module 2-9kl
Project 1 module 2-9klclub23
 
Project 1 module 1-9kl
Project 1   module 1-9klProject 1   module 1-9kl
Project 1 module 1-9klclub23
 
20090510 unicheats.net 520_6094
20090510 unicheats.net 520_609420090510 unicheats.net 520_6094
20090510 unicheats.net 520_6094club23
 
Kolelo
KoleloKolelo
Koleloclub23
 
Proekt
ProektProekt
Proektclub23
 
Prolet
ProletProlet
Proletclub23
 
езици за програмиране. Php
езици за програмиране. Phpезици за програмиране. Php
езици за програмиране. Phpclub23
 
Css layout
Css layoutCss layout
Css layoutclub23
 

More from club23 (15)

Ms office word 2007
Ms office word 2007Ms office word 2007
Ms office word 2007
 
кои сме ние
кои сме ниекои сме ние
кои сме ние
 
Karma
KarmaKarma
Karma
 
компания2
компания2компания2
компания2
 
използване на специализирани програми за получаване и изпращане на файлове в ...
използване на специализирани програми за получаване и изпращане на файлове в ...използване на специализирани програми за получаване и изпращане на файлове в ...
използване на специализирани програми за получаване и изпращане на файлове в ...
 
Project 1 challenge
Project 1   challenge Project 1   challenge
Project 1 challenge
 
Project 1 module 3 -9kl
Project 1   module 3 -9klProject 1   module 3 -9kl
Project 1 module 3 -9kl
 
Project 1 module 2-9kl
Project 1   module 2-9klProject 1   module 2-9kl
Project 1 module 2-9kl
 
Project 1 module 1-9kl
Project 1   module 1-9klProject 1   module 1-9kl
Project 1 module 1-9kl
 
20090510 unicheats.net 520_6094
20090510 unicheats.net 520_609420090510 unicheats.net 520_6094
20090510 unicheats.net 520_6094
 
Kolelo
KoleloKolelo
Kolelo
 
Proekt
ProektProekt
Proekt
 
Prolet
ProletProlet
Prolet
 
езици за програмиране. Php
езици за програмиране. Phpезици за програмиране. Php
езици за програмиране. Php
 
Css layout
Css layoutCss layout
Css layout
 

Recently uploaded

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 

Recently uploaded (20)

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

Html 5-tables-forms-frames (1)

  • 1. HTML 5 – Tables, Forms and Frames Doncho Minkov Technical Trainer http://minkov.it Telerik Web Design Course html5course.telerik.com
  • 2. Contents  HTML Tables  Simple Tables  Complete HTML 5 Tables  Data cells and Header cells  Nested Tables  Complex tables  Cells Width  Cell Spacing and Padding  Column and Row Span 2
  • 3. Contents (2)  HTML Forms  Form Fields and Fieldsets  Text boxes  Buttons  Checkboxes and Radio Buttons  Select fields  Hidden fields  Sliders and Spinboxes  Validation fields 3
  • 4. Contents (3)  HTML Frames  Frame and Noframe tags  IFrames 4
  • 6. 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
  • 7. Simple HTML Tables – Example <table cellspacing="0" cellpadding="5"> <tr> <td><img src="ppt.gif"></td> <td><a href="lecture1.ppt">Lecture 1</a></td> </tr> <tr> <td><img src="ppt.gif"></td> <td><a href="lecture2.ppt">Lecture 2</a></td> </tr> <tr> <td><img src="zip.gif"></td> <td><a href="lecture2-demos.zip"> Lecture 2 - Demos</a></td> </tr> </table> 7
  • 9. Data Cells and Header Cells  Two kinds of cells in HTML 5 tables  Data cells – containing the table data  Header cells – used for the column names or some more important cells in a table  Why two kinds of cells?  Used to semantically separate the cells <tr> <th>Full name</th> <th> Mark </th> </tr> <tr> <td>Doncho Minkov</td> <td>Very good 5</td> </tr> <tr> <td>Georgi Georgiev</td> <td>Exellent 6</td> </tr>
  • 10. Data and Header Cells Live Demo 10
  • 11. Complete HTML 5 Tables With Header, Footer and Body 11
  • 12. Complete HTML Tables  Table rows split into three semantic sections: header, body and footer  <thead> denotes table header and contains <th> elements, instead of <td> elements  <tbody> denotes collection of table rows that contain the very data  <tfoot> denotes table footer but comes BEFORE the <tbody> tag  <colgroup> and <col> define columns (used to set column widths) 12
  • 13. Complete HTML Table: Example <table> columns <colgroup> <col style="width:100px" /><col /> </colgroup> th header <thead> <tr><th>Column 1</th><th>Column 2</th></tr> </thead> footer <tfoot> <tr><td>Footer 1</td><td>Footer 2</td></tr> </tfoot> Last comes the body (data) <tbody> <tr><td>Cell 1.1</td><td>Cell 1.2</td></tr> <tr><td>Cell 2.1</td><td>Cell 2.2</td></tr> </tbody> </table> 13
  • 14. Complete HTML Table: Example (2) <table> table-full.html <colgroup> <col style="width:200px" /><col /> </colgroup> <thead> <tr><th>Column 1</th><th>Column 2</th></tr> </thead> <tfoot> <tr><td>Footer 1</td><td>Footer 2</td></tr> </tfoot> <tbody> Although the footer is <tr><td>Cell 1.1</td><td>Cell 1.2</td></tr> <tr><td>Cellbefore the data in the 2.1</td><td>Cell 2.2</td></tr> </tbody> code, it is displayed last </table> 14
  • 15. Complete HTML 5 Tables Live Demo 15
  • 16. Nested Tables Tables in Tables in Tables in Tables… 16
  • 17. Nested Tables  Table "cells" (<td>) can contain nested tables (tables within tables): <table> <tr> <td>Contact:</td> <td> <table> <tr> <td>First Name</td> <td>Last Name</td> </tr> </table> </td> </tr> </table> nested-tables.html 17
  • 19. Complex Tables With Padding, Spacing and Stuff
  • 20. Cell Spacing and Padding  Tables have two attributes  cellspacing related to space  cellpadding cell cell cell cell  cell cell cell cell Defines the empty space between cells  Defines the empty space around the cell content 20
  • 21. table-cells.html Cell Spacing and Padding – Example <html> <head><title>Table Cells</title></head> <body> <table cellspacing="15" cellpadding="0"> <tr><td>First</td> <td>Second</td></tr> </table> <br/> <table cellspacing="0" cellpadding="10"> <tr><td>First</td><td>Second</td></tr> </table> </body> </html> 21
  • 22. table-cells.html Cell Spacing and Padding – Example (2) <html> <head><title>Table Cells</title></head> <body> <table cellspacing="15" cellpadding="0"> <tr><td>First</td> <td>Second</td></tr> </table> <br/> <table cellspacing="0" cellpadding="10"> <tr><td>First</td><td>Second</td></tr> </table> </body> </html> 22
  • 23. Table Cell Spacing and Cell Padding Live Demo
  • 24. Row and Column Spans How to make a two-cells column? Or row?
  • 25. Column and Row Span  Cells have two attributes  colspan colspan="1" cell[1,1] related to merging  colspan="1" rowspan rowspan="2" rowspan="1" cell[1,2] cell[1,2] cell[1,1] cell[2,1] cell[2,1] rowspan="1" colspan="2"  Defines how many columns the cell occupies  Defines how many rows the cell occupies 25
  • 26. Column and Row Span – Example table-colspan-rowspan.html <table cellspacing="0"> <tr class="1"><td>Cell[1,1]</td> <td colspan="2">Cell[2,1]</td></tr> <tr class="2"><td>Cell[1,2]</td> <td rowspan="2">Cell[2,2]</td> <td>Cell[3,2]</td></tr> <tr class="3"><td>Cell[1,3]</td> <td>Cell[2,3]</td></tr> </table> 26
  • 27. Column and Row Span – Example (2) table-colspan-rowspan.html <table cellspacing="0"> <tr class="1"><td>Cell[1,1]</td> <td colspan="2">Cell[2,1]</td></tr> <tr class="2"><td>Cell[1,2]</td> <td rowspan="2">Cell[2,2]</td> <td>Cell[3,2]</td></tr> <tr class="3"><td>Cell[1,3]</td> Cell[1,1] Cell[2,1] <td>Cell[2,3]</td></tr> </table> Cell[1,2] Cell[3,2] Cell[2,2] Cell[1,3] Cell[2,3] 27
  • 29. HTML 5 Forms Entering User Data from a Web Page
  • 30. What are HTML 5 Forms?  The primary method for gathering data from site visitors  HTML 5 Forms can contain  Text fields for the user to type  Buttons for interactions like "Register", "Login", "Search"  Menus, Sliders, etc…  Check Google, Yahoo, Facebook  Google search field is a simple Text field 30
  • 31. How to Create Forms?  Create a form block with <form></form>  Example: The "method" attribute tells how the form data should be sent – via GET or POST request <form name="myForm" method="post" action="path/to/some-script.php"> ... </form> The "action" attribute tells where the form data should be sent 31
  • 32. Text Fields  Single-line text input fields: <input type="text" name="FirstName" value="This is a text field" />  Multi-line text input fields (textarea): <textarea name="Comments">This is a multi-line text field</textarea>  Password input – a text field which masks the entered text with * signs <input type="password" name="pass" /> 32
  • 33. Buttons  Reset button – brings the form to its initial state <input type="reset" name="resetBtn" value="Reset the form" />  Submit button: <input type="submit" value="Apply Now" />  Image button – acts like submit but image is displayed and click coordinates are sent <input type="image" src="submit.gif" name="submitBtn" alt="Submit" />  Ordinary button – no default action, used with JS <input type="button" value="click me" /> 33
  • 34. Checkboxes and Radio Buttons  Checkboxes: <input type="checkbox" name="fruit" value="apple" />  Radio buttons: <input type="radio" name="title" value="Mr." />  Radio buttons can be grouped, allowing only one to be selected from a group: <input type="radio" name="city" value="Lom" /> <input type="radio" name="city" value="Ruse" /> 34
  • 35. Select Fields  Dropdown menus: <select name="gender"> <option value="Value 1" selected="selected">Male</option> <option value="Value 2">Female</option> <option value="Value 3">Other</option> </select>  Multiple-choice menus <select name="products" multiple="multiple"> <option value="Value 1" selected="selected">keyboard</option> <option value="Value 2">mouse</option> </select> 35
  • 36. Hidden Fields  Hidden fields contain invisible data <input type="hidden" name="Account" value="This is a hidden text field" />  Not shown to the user  Used by JavaScript and server-side code  ViewState, SessionState, etc.. 36
  • 37. Labels  Labels are used to associate an explanatory text to a form field using the field's ID. <label for="fn">First Name</label> <input type="text" id="fn" />  Clicking on a label focuses its associated field (checkboxes are toggled, radio buttons are checked)  Labels are both a usability and accessibility feature and are required in order to pass accessibility validation. 37
  • 38. Fieldsets  Fieldsets are used to enclose a group of related form fields: <form method="post" action="form.aspx"> <fieldset> <legend>Client Details</legend> <input type="text" id="Name" /> <input type="text" id="Phone" /> </fieldset> <fieldset> <legend>Order Details</legend> <input type="text" id="Quantity" /> <textarea cols="40" rows="10" id="Remarks"></textarea> </fieldset> </form>  The <legend> is the fieldset's title. 38
  • 39. HTML 5 Forms Inputs Fields Live Demo 39
  • 41. Range and Spinbox  Restricts users to enter only numbers  Additional attributes min, max and step and value  Can become Spinbox or Slider, depending on the input type <input type="range" min="0" max="100" /> <input type="number" min="0" max="100" />  Have some differences on different browsers  Sliders and Spinboxes do not work on Firefox  Shown as regular textboxes 41
  • 43. Attributes from HTML 5  Autocomplete  The browser stores the previously typed values  Brings them back on a later visit on the same page  Autofocus  The field becomes on focus on page load  Required  The field is required to be filled/selected 43
  • 44. Input Fields with Validation  Email – provides a simple validation for email  Can be passed a pattern for validation  On a mobile device brings the email keyboard <input type="email" required="true" pattern="[^ @]*@[^ @].[^ @]"/>  URL – has validation for url  On a mobile device brings the url keyboard <input type="url" required="true" />  Telephone  Brings the numbers keyboard <input type="tel" required="true" /> 44
  • 46. TabIndex  The tabindex HTML attribute controls the order in which form fields and hyperlinks are focused when repeatedly pressing the TAB key  tabindex="0" (zero) - "natural" order  If X < Y, then elements with tabindex="X" are iterated before elements with tabindex="Y"  Elements with negative tabindex are skipped, however, this is not defined in the standard <input type="text" tabindex="10" /> 46
  • 49. HTML Frames  Frames provide a way to show multiple HTML documents in a single Web page  The page can be split into separate views (frames) horizontally and vertically  Frames were popular in the early ages of HTML development, but now their usage is rejected  Frames are not supported by all user agents (browsers, search engines, etc.)  A <noframes> element is used to provide content for non-compatible agents. 49
  • 50. HTML Frames – Demo frames.html <html> <head><title>Frames Example</title></head> <frameset cols="180px,*,150px"> <frame src="left.html" /> <frame src="middle.html" /> <frame src="right.html" /> </frameset> </html>  Note the target attribute applied to the <a> elements in the left frame. 50
  • 51. Inline Frames: <iframe>  Inline frames provide a way to show one website inside another website: iframe-demo.html <iframe name="iframeGoogle" width="600" height="400" src="http://www.google.com" frameborder="yes" scrolling="yes"></iframe> 51
  • 52. HTML – Tables and Forms Questions? http://academy.telerik.com
  • 53. Homework 1. Create Web Pages like the following using tables: 2. Create a Web Page like the following using forms: 53
  • 54. Homework (2) 3. Create a Web form that looks like this sample: 54
  • 55. Homework (3) 4. Create a Calculator-like table. You should use a HTML 5 form for the Calculator  Buttons for all the numbers and operators (+, -, etc.)  Textbox for the result  Do not make the same styles as the example. 55
  • 56. Homework (4) 5. Create the following using tables and forms: 56
  • 57. Homework (5) 6. Construct the following Grid component:  Try to make a HTML page, that looks just like the example  Not required to style for the homework 57
  • 58. Homework (7) 7. Create the following HTML 5 Page  Hint: Use Fieldsets and Nested tables 58