Skip to content

Instantly share code, notes, and snippets.

@mbMosman
Last active October 18, 2017 15:37
Show Gist options
  • Save mbMosman/5785c6e9534e956b79d7 to your computer and use it in GitHub Desktop.
Save mbMosman/5785c6e9534e956b79d7 to your computer and use it in GitHub Desktop.
HTML Class Gists
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Bootstrap 101 Template</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<h1>Hello, world!</h1>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<!-- Latest compiled and minified Bootstrap JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Title Me!!!</title>
<link rel="stylesheet" href="" />
<meta charset="utf-8" />
</head>
<body>
<p>Replace me with your content.</p>
</body>
</html>
<table>
<tr>
<td>Row 1, Column 1</td><td>Row 1, Column 2</td><td>Row 1, Column 3</td>
</tr>
<tr>
<td>Row 2, Column 1</td><td>Row 2, Column 2</td><td>Row 2, Column 3</td>
</tr>
<tr>
<td>Row 3, Column 1</td><td>Row 3, Column 2</td><td>Row 3, Column 3</td>
</tr>
</table>
<table>
<caption>Basic Table with Headings</caption>
<tr>
<th>Heading 1</th><th>Heading 2</th><th>Heading 3</th>
</tr>
<tr>
<td>Row 1, Column 1</td><td>Row 1, Column 2</td><td>Row 1, Column 3</td>
</tr>
<tr>
<td>Row 2, Column 1</td><td>Row 2, Column 2</td><td>Row 2, Column 3</td>
</tr>
<tr>
<td>Row 3, Column 1</td><td>Row 3, Column 2</td><td>Row 3, Column 3</td>
</tr>
</table>
<table>
<caption>Table spanning Rows & Columns</caption>
<tr>
<th>Heading 1</th>
<th colspan="2">Heading 2</th>
</tr>
<tr>
<td>Row 1, Column 1</td>
<td>Row 1, Column 2 part 1</td>
<td>Row 1, Column 2 part 2</td>
</tr>
<tr>
<td>Row 2, Column 1</td>
<td colspan="2">Row 2, Column 2 spanning columns</td>
</tr>
<tr>
<td>Row 3, Column 1</td>
<td>Row 3, Column 2 part 1</td>
<td>Row 3, Column 2 part 2</td>
</tr>
<tr>
<td rowspan="2">Row 4, Column 1</td>
<td>Row 4, Column 2 part 1</td>
<td>Row 4, Column 3 part 1</td>
</tr>
<tr>
<td>Row 4, Column 2 part 1</td>
<td>Row 4, Column 3 part 1</td>
</tr>
</table>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Ice-Cream Rocks!</title>
<meta charset="utf-8">
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Ice-Cream Rocks!</h1>
</header>
<main>
<p>My favorite thing is <span class="ice-cream">ice-cream</span>. I think it's awesome and I could eat it forever.</p>
<div id="favs">
<h2>Favorite Ice-Cream Spots</h2>
<p>These are a few of my favorite spots to get <span class="ice-cream">ice-cream</span> in the Twin cities.</p>
<ul>
<li><a href="https://izzysicecream.com/">Izzy's</a></li>
<li><a href="http://www.pumphouse-creamery.com/">Pumphouse Creamery</a></li>
<li><a href="http://grandolecreamery.com/web/">Grand Ole Creamery</a></li>
<li><a href="https://milkjamcreamery.com/">Milkjam Creamery</a></li>
</ul>
</div>
<h2>Favorite Treats</h2>
<p>
One of my favorite <span class="ice-cream">ice-cream</span> treats is to take plain and simple chocolate
<span class="ice-cream">ice-cream</span> and top it with one of the flavored Kahlua liquors. Hazelnut Kahlua
is my favorite, but the Salted Caramel is also pretty good.
</p>
</main>
<footer>
Copyright &copy; 2016 <a href="mailto:[email protected]">Mary Mosman</a>
</footer>
</body>
</html>
header, main, nav, footer, figure, figcaption, aside, section, article {
display: block;
}
<!-- Add to the head section -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"> </script>
<![endif]-->
<!DOCTYPE html>
<html lang="en">
<head>
<title>Title Me!!!</title>
<link rel="stylesheet" href="" />
<meta charset="utf-8" />
</head>
<body>
<!-- Header -->
<header><h1>Update the site title</h1></header>
<!-- Navigation -->
<nav>
</nav>
<!-- Main content area -->
<main>
Replace me with your content.
</main>
<!-- Footer -->
<footer>
</footer>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment