Skip to content

Instantly share code, notes, and snippets.

@nagisa
Created May 29, 2012 18:48
Show Gist options
  • Save nagisa/2829991 to your computer and use it in GitHub Desktop.
Save nagisa/2829991 to your computer and use it in GitHub Desktop.
<!-- This is your HTML -->
<html>
<head>
<title>This is title of your page</title>
<!-- You should include styles into page like this (see another gist) -->
<link href="css/style.css" rel="stylesheet">
</head>
<body>
<!-- That's your header, as you may already know -->
<h1>Hello World!</h1>
<!-- And this is content -->
<p>Hello, my name is Vytautas.</p>
</body>
</html>
/* This is your CSS */
/* Now, there are several ways to select which element you do want to style up. */
/* It is pretty easy to remember, because there are not much of those ways. */
/* Let's begin with most simple way, called tag matching */
h1 { /* With `h1`, I tell browser that I want to style <h1> element. */
color: red; /* I want text to be red, */
font-size: 20px; /* and 20px sized. */
}
/* You can style any element which goes into <html> */
body { /* Like body... */
background-color: black; /* Which I want to be black. */
}
p { /* Or p, which is child of body */
color: white;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment