Need Help! Writing my first plugin - MailChimp Signup form

Hi all,

Just wondering if I could get some help on writing my first plugin, a Mailchimp Signup Widget.

I am a total coding noob, but have been able to piece together some code from the interweb, and have a functioning form. But in order to get it to work, I have had to paste the 'raw" code into a text widget. This is okay, but I want to tidy up the widget area, and perhaps turn the code into a plugin.

Here is the code that I have at the moment:

<!-- Begin MailChimp Signup Form -->
<div id="optin">

	<form action=" **MailChimp API Taken out" " method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">

		<input type="email" size="30" value="Enter your email" name="EMAIL" class="required email" id="mce-EMAIL" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;">

		<input type="text" size="30" value="Enter your First Name" name="FNAME" class="name" id="mce-FNAME" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;">

		<input type="text" size="30" value="Enter your Surname" name="SNAME" class="name" id="mce-SNAME" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;">

		<div id="mce-responses" class="clear">
			<div class="response" id="mce-error-response" style="display:none"></div>
			<div class="response" id="mce-success-response" style="display:none"></div>
		</div>

		<div class="clear">
			<input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button">
		</div>
	</form>
</div>
<!--End mc_embed_signup-->

I also have some CSS that I have added to my theme style sheet, but should probably put that as a separate file in the plugin folder.

Can anybody point me in the right direction?

Thanks in advance