You could have actually used span's instead of p tags. Since a p tag will also add spacing because it's a new paragraph.
Also, you put class=".maintag" it should just be class="maintag". the peroid is for specifying it as a CLASS in the CSS part of the code.
Looks good. Good way to get started with CSS if you haven't used it before.