Direct basic CSS code (CSS on the same page as HTML) looks like this:
<div style="background-image:url(http://yourpicture.com);background-repeat:no-repeat;height:400px;width:300px;margin-top:10px;">
<h1 style="color:#006699;line-height:18px;padding:10px 10px 10px 10px;">This is a Title headline</h1>
<p style="color:black;padding:12px 15px 15px 20px;">This is sample paragraph</p></div>
Notice how both the CSS and the HTML is contained within the div.
The first part, <div style="background-image:url(http://yourpicture.com);background-repeat:no-repeat;height:400px;width:300px;margin-top:10px;"> inserts a background image. But it also uses CSS to define the height, width, and margins for the background image. Most importantly, it starts a div.
The second part, <h1 style="color:#006699;line-height:18px;padding:10px 10px 10px 10px;">This is a Title headline</h1> inserts the text "This is a Title headline". But it also uses CSS to define the text color, line-height, and padding. <h1 style=" opens an element, and </h1> closes it.
The 3rd part, <p style="color:black;padding:12px 15px 15px 20px;">This is sample paragraph</p></div> inserts a paragraph containing the text "This is sample paragraph". But it also uses CSS to define the text color of the paragraph and padding. <p style=" opens the paragraph and </p> closes the paragraph.
Finally, at the very end, there is a </div> which closes the original <div style=".