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="">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


<iframe class="youtube-player" type="text/html" width="640" height="385" src="" frameborder="0">

basic html 5 template

from here:

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

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

<!--[if IE]>
	<script src=""></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]-->

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