That there is called a Internal Style Sheet. You can do that. Basically three ways to add CSS: Inline Style, Internal Style Sheet, and External Style Sheet(Recommended). External:
<head><link rel="stylesheet" type="text/css" href="mystyle.css" /></head>
Internal(like what you pasted):
<head><style type="text/css">hr {color:sienna;}p {margin-left:20px;}body {background-image:url("images/back40.gif");}</style></head>
Inline:
<p style="color:sienna;margin-left:20px">This is a paragraph.</p>
That is a HTML document. Maybe you're use to seeing this:
<!DOCTYPE html><html><head><link rel="stylesheet" type="text/css" href="mystyle.css" /></head><body><h1>CSS example!</h1><p>This is a paragraph.</p></body></html>
The mystyle.css would have all your styling for that page(s). mystyle.css (just an example):
body (background-color: lightblue;} p { color: grey; text-indent: 50px;} h1 {background-color: yellow;}