Skip to content

Instantly share code, notes, and snippets.

@ravasthi
Created December 3, 2011 00:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ravasthi/1425452 to your computer and use it in GitHub Desktop.
Save ravasthi/1425452 to your computer and use it in GitHub Desktop.
HTML5 placeholder
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>HTML5 Placeholder</title>
<style type="text/css" media="screen">
html
{
font-size: 62.5%;
}
body
{
font-family: Calibri, "Myriad Pro", Tahoma, sans-serif;
font-size: 1.6rem;
line-height: 2.2rem;
}
fieldset
{
margin: 0;
border-style: none;
padding: 0;
}
input[type=text], textarea
{
border: 1px solid black;
padding: 1px 5px;
background: white;
width: 200px;
font-family: Calibri, "Myriad Pro", Tahoma, sans-serif;
font-size: 1.4rem;
line-height: 1.8rem;
}
th
{
padding-right: 2rem;
vertical-align: top;
text-align: left;
}
#page
{
margin: 4.4rem 4rem;
}
</style>
</head>
<body>
<div id="page">
<h3>HTML5 placeholder</h3>
<form>
<fieldset>
<table class="form">
<tbody>
<tr>
<th>Text input</th>
<td>
<input type="text" placeholder="some text"/>
</td>
</tr>
<tr>
<th>Textarea</th>
<td>
<textarea placeholder="some text"></textarea>
</td>
</tr>
</tbody>
</table>
</fieldset>
</form>
</div> <!-- /#page -->
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment