Skip to content

Instantly share code, notes, and snippets.

@spaghettiSyntax
Created December 6, 2017 08:08
Show Gist options
  • Save spaghettiSyntax/67d12aee22f3fccda40e432f96791ed4 to your computer and use it in GitHub Desktop.
Save spaghettiSyntax/67d12aee22f3fccda40e432f96791ed4 to your computer and use it in GitHub Desktop.
HTML/CSS: Basic Site Styled
<!DOCTYPE html>
<html lang="en">
<head>
<title>Computer Programming</title>
<link rel="stylesheet" href="css/normalize.css" />
<style>
body{
font-size: 100%;
/* margin-top: 15px; */
margin-left: 1.5em;
}
h1{
text-align: left;
/* color: darkkhaki; */
/* color: rgb(39, 124, 22); */
color: #277c16;
border-bottom: 2px solid black;
}
/* Selects ALL anchor tags on the page */
a{
font-size: 2em;
/* Selects all ANCHOR tags with a class of "dangerLink" */
}
a.dangerLink{
color: red;
}
/* Selects ALL ELEMENTS with a class of "dangerLink" */
.dangerLink{
color: red;
}
/* Select an element with an ID of "subHeading"
Should be unique, one element at most */
#subHeading{
text-align: right;
}
</style>
</head>
<body>
<header>
<!-- Example of inline style -->
<h1 style="text-align: center;">Computer Programming</h1>
</header>
<main>
<h2 id="subHeading">Here is some program info...</h2>
<hr />
<nav>
<ul>
<li><a class="dangerLink" href="#">View Our Degrees</a></li>
<li><a class="dangerLink" href="#">View Class List</a></li>
<li><a href="#">Meet the Instructors</a></li>
</ul>
</nav>
</main>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment