Skip to content

Instantly share code, notes, and snippets.

@yicui
Last active December 11, 2015 04:28
Show Gist options
  • Save yicui/4545081 to your computer and use it in GitHub Desktop.
Save yicui/4545081 to your computer and use it in GitHub Desktop.
A simple step-by-step example of webpage styling
<!DOCTYPE html>
<html>
<head>
<title>Webpage Styling</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="web, CSS, styling, div" />
<meta name="description" content="A simple step-by-step example of webpage styling" />
<style>
#header {
background-color:red;
}
.lists {
text-align:center;
}
p {
font-family:arial;
background-color:yellow;
font-size:1.2em;
color:blue;
}
</style>
</head>
<body>
<h1 id="header">Special Topics on Web Development</h1>
<p>In this webpage you can find main course materials of this course </p>
<div>
<h2>Lecture Notes</h2>
<p>This section contains all lecture notes
<ul class="lists">
<li>Lecture 1</li>
<li>Lecture 2</li>
</ul>
</div>
<div>
<h2>Assignments</h2>
<p>This section contains all assignments
<ol class="lists">
<li>Assignment 1</li>
<li>Assignment 2</li>
</ol>
</div>
</body>
</html>
@yicui
Copy link
Author

yicui commented Jan 16, 2013

Original Gist: webpage with no styles
1st Revision: style attributes added to individual tags
2nd Revision: styling instructions concentrated to the <style>...</style> tag pair

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment