Stay N Tom

Showing a slice of what it means to be Thomas.

Pages

Wednesday, March 6, 2013

ID please, and and make it classy!


Halt! In the name of programming! Before you go on I may warn you that ID and classes are very helpful!

Hello my friends. Without class's and ID's We wouldn't be able to do awesome stuff like This and this and This. Well how do I do it you might say? Well, I'll show you.


here is the code:



<html>
<head>
<title>My class, My id</title>
<style type="text/css">
.red {
color: red
}
#id {
font-size: 45px;
color: blue
}
</style>
</head>
<body>
<h3 class="red">Your header here</h3>
<p class="red">Your paragraph here</p>
<p id="id">AWESOME</p>
</body>
</html>


Note: classes can have more than one HTML attribute, while id's can not.

No comments:

Post a Comment