+ All Categories
Home > Technology > #2 of HTML and CSS3

#2 of HTML and CSS3

Date post: 12-May-2015
Category:
Upload: ahmed-yousef
View: 1,201 times
Download: 0 times
Share this document with a friend
Description:
second session in HTML5 in DEVMIX team mini courses
25
Learn HTML5/CSS3 part 2 By:-AhmedYousef Co-founder DEVMIX team By:AhmedYousef
Transcript
Page 1: #2 of HTML and CSS3

Learn HTML5/CSS3part 2

By:-AhmedYousefCo-founder DEVMIX team

By:AhmedYousef

Page 2: #2 of HTML and CSS3

Project 1

Surprise

By:AhmedYousef

Page 3: #2 of HTML and CSS3

HTML5 Web Storage

HTMl5 storting data on the Client.HTML5 uses two new objects for storing

data on the client :-1. local Storage :- stores data with no time limit.2. session Storage :- stores data for one session.

By:AhmedYousef

Page 4: #2 of HTML and CSS3

The local Storage ObjectHow to write It (General) :-

<script type="text/javascript">localStorage.lastname=« ahmed";document.write("Last name: " + localStorage.lastname);</script>

By:AhmedYousef

Page 5: #2 of HTML and CSS3

Con. The local Storage Object

Examble:- count # of visits, <script type="text/javascript">if (localStorage.pagecount)

{ localStorage.pagecount=Number(localStorage.pagecount) +1; }else{ localStorage.pagecount=1; }document.write("Visits: " + localStorage.pagecount + " time(s).");</script> <p>Refresh the page to see the counter increase.</p><p>Close the browser window, and try again, and the counter will continue.</p>

By:AhmedYousef

Page 6: #2 of HTML and CSS3

The session Storage ObjectHow to write It (General) :-

<script type="text/javascript">sessionStorage.lastname="Smith";document.write(sessionStorage.lastname);</script>

By:AhmedYousef

Page 7: #2 of HTML and CSS3

Con. The session Storage Object Examble:- count # of visits, <script type="text/javascript">if (sessionStorage.pagecount)

{ sessionStorage.pagecount=Number(sessionStorage.pagecount) +1; }else

{ sessionStorage.pagecount=1; }document.write("Visits " + sessionStorage.pagecount + " time(s) this session.");</script> <p>Refresh the page to see the counter increase.</p><p>Close the browser window, and try again, and the counter has been reset.</p>

By:AhmedYousef

Page 8: #2 of HTML and CSS3

HTML5 Input TypesHTML5 New Input Types:- Email. Url. Number. Range. Date pickers (date, month, week, time, datetime,

datetime-local) Search. Color.

By:AhmedYousef

Page 9: #2 of HTML and CSS3

Con. HTML5 Input TypesInput Type – email:- It is used with input fields that contain e-mails. The value of the email field is automatically validated

when the form is submitted.Browser Support:-

Input type IE Firefox Opera Chrome Safari

email No 4.0 9.0 10.0 No

By:AhmedYousef

Page 10: #2 of HTML and CSS3

Con. HTML5 Input TypesHow E-mail Works?? <!DOCTYPE HTML><html><body><form action="#" method="get">E-mail: <input type="email" name="user_email" /><br /><input type="submit" /></form></body></html>

By:AhmedYousef

Page 11: #2 of HTML and CSS3

Con. HTML5 Input TypesInput Type – Url :- It is used with input fields that contain Url. It is automatically validated when the form is submitted.Browser Support:-

Input type IE Firefox Opera Chrome Safariurl No 4.0 9.0 10.0 No

By:AhmedYousef

Page 12: #2 of HTML and CSS3

Con. HTML5 Input TypesHow URL Works??<!DOCTYPE HTML><html><body><form action=« #" method="get">Homepage: <input type="url" name="user_url" /><br /><input type="submit" /></form></body></html>

By:AhmedYousef

Page 13: #2 of HTML and CSS3

Con. HTML5 Input TypesInput Type - number It is used with input fields that contain numeric value. set restrictions on what numbers are accepted?!Browser Support:-

Input type IE Firefox Opera Chrome Safarinumber No No 9.0 7.0 No

By:AhmedYousef

Page 14: #2 of HTML and CSS3

Con. HTML5 Input TypesHow Number Works?? <!DOCTYPE HTML><html><body><form action="#" method="get">Points: <input type="number" name="points" min="1" max="10" /><input type="submit" /></form></body></html>

By:AhmedYousef

Page 15: #2 of HTML and CSS3

Con. HTML5 Input TypesInput Type – number attributs:-

Attribute Valuenumber max

number min

number step

number value

By:AhmedYousef

Page 16: #2 of HTML and CSS3

Con. HTML5 Input TypesInput Type – range:- It is used with input fields that contain value from a

range of numbers.set restrictions on what numbers are acceptedBrowser Support:-

Have the same attribute of Number.

Input type IE Firefox Opera Chrome Safarirange No No 9.0 4.0 4.0

By:AhmedYousef

Page 17: #2 of HTML and CSS3

Con. HTML5 Input TypesHow Range Works??<!DOCTYPE HTML><html><body><form action=" #" method="get">Points: <input type="range" name="points" min="1" max="10" /><input type="submit" /></form></body></html>

By:AhmedYousef

Page 18: #2 of HTML and CSS3

Con. HTML5 Input TypesInput Type - Date Pickers:- There are several wayes to write Date:-I. date - Selects date, month and yearII. month - Selects month and yearIII. week - Selects week and yearIV. time - Selects time (hour and minute)V. datetime - Selects time, date, month and year (UTC time)VI. datetime-local - Selects time, date, month and year (local time)

By:AhmedYousef

Page 19: #2 of HTML and CSS3

Con. HTML5 Input TypesHow Date Pickers Works??<!DOCTYPE HTML><html><body><form action="#" method="get">Date: <input type="date" name="user_date" /><input type="submit" /></form></body></html>

By:AhmedYousef

Page 20: #2 of HTML and CSS3

Con. HTML5 Input Types

Input Type - Date Pickers:-

Browser Support:-

Input type IE Firefox Opera Chrome SafariDate pickers No No 9.0 10.0 No

By:AhmedYousef

Page 21: #2 of HTML and CSS3

Con. HTML5 Input TypesInput Type – search:- The search field behaves like a regular text field. The search type is used for search fields.Browser Support:-

Input type IE Firefox Opera Chrome Safarisearch No 4.0 11.0 10.0 No

By:AhmedYousef

Page 22: #2 of HTML and CSS3

Con. HTML5 Input Types

• How Search Works?? <form><input type="text" name="q" size="15" maxlength="255" value="" placeholder="Search"/> <input type="submit" value="GO"/>

</form

By:AhmedYousef

Page 23: #2 of HTML and CSS3

Con. HTML5 Input TypesInput Type – color:-It is used with input fields that contain a color.Hint:-in Opera appear color picker but in chrome

support only heaxa values. Browser Support:-

Input type IE Firefox Opera Chrome Safaricolor No No 11.0 12 No

By:AhmedYousef

Page 24: #2 of HTML and CSS3

Con. HTML5 Input TypesHow Color Works?? <!DOCTYPE HTML><html><body><form action="#" method="get">Color: <input type="color" name="user_color" /><input type="submit" /></form></body></html>

By:AhmedYousef

Page 25: #2 of HTML and CSS3

Project2

Register form for DEVMIX mini Course HTML5/CSS3

By:AhmedYousef


Recommended