you are here: codestackercodes [RSS] → tag html5 [RSS]

useful html5 attributes for iOS

<!-- For a username, you don't want to autocorrect, nor do you want a capitalised first letter. -->
<input type="text" autocorrect="off" autocapitalize="off">

<!-- Turn telephone detection off -->
<meta name="format-detection" content="telephone=no" />

<!-- Make webpage an app (get rid of top bar) when bookmarked to home screen -->
<meta name="apple-mobile-web-app-capable" content="yes" />

<!-- Number keyboards -->
<input type="tel" /> <input pattern="[0-9]*">

<!-- URL/Emails -->
<input type="url"> <input type="email">

<!-- Links -->
<a href="http://maps.google.com/maps?q=Moon">Open in Google Maps</a>
<a href="tel:01234567890">Open the phone</a>
<a href="twitter:Tweet Tweet Tweet">Open the Twitter for iPhone app</a>

embed youtube using html5

via http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html

<iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/VIDEO_ID" frameborder="0">
</iframe>

basic html 5 template

from here: http://www.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Smashing HTML5!</title>

<link rel="stylesheet" href="css/main.css" type="text/css" />

<!--[if IE]>
	<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<!--[if lte IE 7]>
	<script src="js/IE8.js" type="text/javascript"></script><![endif]-->
<!--[if lt IE 7]>

	<link rel="stylesheet" type="text/css" media="all" href="css/ie6.css"/><![endif]-->
</head>

<body id="index" class="home">
</body>
</html>
Displaying all 3 Code