You don't nessecarily have to make the code absolutely valid, however, it will help you if your code is valid and makes sense semantically. A few examples of this would be:
Use heading tags ([font=courier]<h1>[/font] through [font=courier]<h6>[/font]) in their correct order.
Use [font=courier]<strong>[/font] instead of [font=courier]<b>[/font].
Use [font=courier]<em>[/font] instead of [font=courier]<i>[/font].
Use tables only for tabular data (what they're intended for) as opposed to a site layout or other incorrect usage.
Define a [font=courier]title[/font] attribute for all links and other elements to describe what it does.
Define an [font=courier]alt[/font] attribute on all [font=courier]<img>[/font] to provide alternative content for users in which are blind or users in which don't have a browser that supports images.
Use [font=courier]<abbr>[/font] and [font=courier]<acronym>[/font] for abbreviations and acronyms, respectively.
Have descriptive content for your [font=courier]<title>[/font] element.
As for your other question, If people can access files on your server, search engines should be able to as well. However, it really depends on how semantically meaningful your markup is and who else is linking to your site.