Last active
August 29, 2015 14:27
-
-
Save jfraboni/fed85550d7f39e022f07 to your computer and use it in GitHub Desktop.
A Well of HTML
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dl> | |
<dt>Canada</dt> | |
<dd>A very cold country</dd> | |
<dt>Brazil</dt> | |
<dd>A very warm country</dd> | |
</dl> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.flex-row { | |
display: flex; | |
flex-direction: row; | |
justify-content: space-between; | |
margin: 20px; | |
padding: 4px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="flex-row"> | |
<div>One</div> | |
<div>Two</div> | |
<div>Three</div> | |
<div>Four</div> | |
<div>Five</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.example-form { | |
/* Just to center the form on the page, use: margin: 0 auto;*/ | |
margin: 20px; | |
width: 400px; | |
/* To see the outline of the form */ | |
padding: 1em; | |
border: 1px solid #CCC; | |
border-radius: 1em; | |
} | |
.example-form div + div { | |
margin-top: 1em; | |
} | |
.example-form label { | |
/* To make sure that all labels have the same size and are properly aligned */ | |
display: inline-block; | |
width: 90px; | |
} | |
.example-form input, | |
.example-form textarea { | |
/* To make sure that all text fields have the same font settings | |
By default, textareas have a monospace font */ | |
font: 1em sans-serif; | |
/* To give the same size to all text field */ | |
width: 300px; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
/* To harmonize the look & feel of text field border */ | |
border: 1px solid #999; | |
} | |
.example-form input:focus, | |
.example-form textarea:focus { | |
/* To give a little highlight on active elements */ | |
border-color: #000; | |
} | |
.example-form textarea { | |
/* To properly align multiline text fields with their labels */ | |
vertical-align: top; | |
/* To give enough room to type some text */ | |
height: 5em; | |
/* To allow users to resize any textarea vertically | |
It does not work on every browsers */ | |
resize: vertical; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form class="example-form"> | |
<div> | |
<label for="name">Name:</label> | |
<input type="text" id="name" /> | |
</div> | |
<div> | |
<label for="mail">E-mail:</label> | |
<input type="email" id="mail" /> | |
</div> | |
<div> | |
<label for="msg">Message:</label> | |
<textarea id="msg"></textarea> | |
</div> | |
<div class="button"> | |
<button type="submit">Send your message</button> | |
</div> | |
</form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.example-grid { | |
margin: 20px; | |
} | |
.row-img { | |
margin: 4px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="example-grid"> | |
<div class="row"> | |
<div class="col-md-2"><img src="../img/cherries.jpg" class="row-img"></img> | |
</div> | |
<div class="col-md-10">Cherries are tasty things that grow on trees! You can eat them and feel good about yourself!</div> | |
</div> | |
<div class="row"> | |
<div class="col-md-2"><img src="../img/black-currant.jpg" class="row-img"></img> | |
</div> | |
<div class="col-md-10">Black Currents are tasty things that grow on bushes! You can eat them and feel good about yourself!</div> | |
</div> | |
<div class="row"> | |
<div class="col-md-2"><img src="../img/apple-in-grass.jpg" class="row-img"></img> | |
</div> | |
<div class="col-md-10">Apples are tasty things that grow on trees! You can eat them and feel good about yourself! They make great pies!</div> | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body> | |
<div id="container" class="container"> | |
<p> | |
This paragraph tag belongs to the div tag with id "container", and the div tag belongs to the body tag! | |
</p> | |
</div | |
</body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body> | |
<div id="container" class="container"> | |
<!-- ALL YOUR MARKUP GOES BELOW HERE --> | |
<!-- ALL YOUR MARKUP GOES ABOVE HERE --> | |
</div> | |
<!-- other html... --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
table { | |
margin: 20px; | |
} | |
table, | |
th, | |
td { | |
padding: 4px; | |
border: 1px solid black; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table> | |
<thead> | |
<tr> | |
<th>First Name</th> | |
<th>Last Name</th> | |
</tr> | |
</thead> | |
<tfoot> | |
<tr> | |
<td colspan="2">Names of students in class of 2020...</td> | |
</tr> | |
</tfoot> | |
<tbody> | |
<tr> | |
<td>Bob</td> | |
<td>Harrison</td> | |
</tr> | |
<tr> | |
<td>Judy</td> | |
<td>Dorsy</td> | |
</tr> | |
</tbody> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment