/    Sign up×
Community /Pin to ProfileBookmark

Website opening as HTML code

Hi, I created an HTML document using notepad. It is for a mass email project where we need individual HTML documents. However, when I go to open it, it doesn’t open as a web page. I just see the HTML. I can’t figure out what is wrong. If I copy this and paste it in a new notepad document and save it, it works like a charm. Please help me before I go completely crazy.

Thank you.

Here is the code:

<html>
<body>
<style>
.headerTop { background-color:#075c25; border-top:0px solid #000000; border-bottom:0px solid #FFCC66; text-align:right; }
.adminText { font-size:10px; color:#FFFFCC; line-height:200%; font-family:verdana; text-decoration:none; }
.headerBar { background-color:#FFFFFF; border-top:0px solid #FFFFFF; border-bottom:0px solid #333333; }
.title { font-size:22px; font-weight:bold; color:#336600; font-family:arial; line-height:110%; }
.subTitle { font-size:11px; font-weight:normal; color:#666666; font-style:italic; font-family:arial; }
td { font-size:12px; color:#000000; line-height:150%; font-family:trebuchet ms; }
.footerRow { background-color:#FFFFCC; border-top:10px solid #FFFFFF; }
.footerText { font-size:10px; color:#333333; line-height:100%; font-family:verdana; }
a { color:#FF0000; color:#FF6600; color:#FF6600; }
</STYLE>
<table width=”100%” cellpadding=”10″ cellspacing=”0″ class=”backgroundTable” bgcolor=”#FFFFFF”>
<tr>
<td valign=”top” align=”center”>
<table width=”596″ cellpadding=”0″ cellspacing=”0″>
<tr>
<td style=”background-color:#ced1d4;border-top:0px solid #000000;border-bottom:0px solid #FFCC66;text-align:right;” align=”center”><span style=”font-size:10px;color:#000000;line-height:200%;font-family:verdana;text-decoration:none;”>Email not displaying correctly? <a href=”../HTML/*/ARCHIVE/*” style=”font-size:10px;color:#000000;line-height:200%;font-family:verdana;text-decoration:none;”>View it in your browser.</a></span></td>
</tr>
</table>
<table width=”596″ height=”5″ cellpadding=”0″ cellspacing=”0″>
<tr>
<td style=”background-color:#fff;”></td>
</tr>
</table>
<table width=”594″ border=”1″ cellpadding=”0″ cellspacing=”0″>
<tr>
<td>
<table width=”594″ cellpadding=”0″ cellspacing=”0″>
<tr>
<td width=”300″ height=”150″>
<img src=”C:/Documents and Settings/athard/Desktop/Hunter Douglas Email Test/test/Logos/236685.jpg” width=”300″ height=”150″>
</td>
<td width=”292″ align=”center” style=”background-color:#FFFFFF;font-family:arial, helvetica, sans-serif; font-size: 14px; line-height:130%; padding:2px;”>
A Shade Above LLC<br>
708 Aquidneck Ave<br>
Middletown, RI 2842-5692<br>
401-849-5664<br>
ashadeabove.hdwfg.com<br>
<br>
</td>
</tr>
</table>
<table width=”594″ cellpadding=”10″ cellspacing=”0″ bgcolor=”#FFFFFF”>
<tr>
<td bgcolor=”#c9e4b9″ valign=”top” align=”center”><span style=”font-family: arial; font-size: 19px; color:#181e1a;”>Contact Us Today For Exceptional Savings From Hunter Douglas!</span></td>
</tr>
</table>
<table width=”594″ cellpadding=”0″ cellspacing=”0″>
<tr>
<td height=”183″ style=”background-color:#FFFFFF;border-top:0px solid #FFFFFF;border-bottom:0px solid #333333;”><center>
<img src=”C:/Documents and Settings/athard/Desktop/Hunter Douglas Email Test/test/HD_03.jpg” width=”594″ height=”213″ alt=”Federal Tax Credit up to $1500 or a $25 Mail-in Rebate per unit”>
</center></td>
</tr>
</table>
<table width=”594″ cellpadding=”0″ cellspacing=”0″>
<tr>
<td height=”183″ style=”background-color:#FFFFFF;border-top:0px solid #FFFFFF;border-bottom:0px solid #333333;”><center>
<img src=”HD_04.jpg” width=”594″ height=”397″ alt=”Energy Savings Made Beautiful”>
</center></td>
</tr>
</table>
<table width=”594″ cellpadding=”0″ cellspacing=”0″>
<tr>
<td height=”150″ tyle=”background-color:#FFFFFF;border-top:0px solid #FFFFFF;border-bottom:0px solid #333333;”><center>
<img src=”HD_05.jpg” width=”594″ height=”75″ alt=”Federal Tax Credit up to $1500 or a $25 Mail-in Rebate per unit”><br/>
<span style=”font-family: arial; font-size: 30px; color:#008361; padding:10px; line-height:105%”>Bring in a printout of this ad to receive FREE measuring and installation.</span>
</center></td>
</tr>
</table>
<table width=”594″ cellpadding=”10″ cellspacing=”0″>
<tr>
<td style=”background-color:#FFFFFF;border-top:0px solid #FFFFFF;border-bottom:0px solid #333333;”>
<span style=”font-size:8px;color:#000000;line-height:14px;font-family:verdana;text-decoration:none;”><br>
*For tax credit details and restrictions and a list of qualifying products, ask a salesperson or check out the Manufacturer&rsquo;s Certification Statement and FAQs at hunterdouglas.com/taxcredit. Hunter Douglas and its dealers are not tax advisors. Consult a tax professional regarding your individual tax situation and ability to claim a tax credit related to the purchase of qualifying Duette<sup>&reg;</sup> honeycomb shades with Architella<sup>&reg;</sup> fabric. **Energy savings based on inside-mounted shades in all windows. Savings vary with such factors as specific Architella fabric, window R-value, shade use and climate. ***Manufacturer&rsquo;s rebate offer valid for purchases made 9/25/10&ndash;12/15/10. Limitations and restrictions apply. Ask for details.<br>
<br>
&copy; 2010 Hunter Douglas. &reg; and TM are registered trademarks of Hunter Douglas. HDID #00000000</span>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

Thanks

to post a comment
HTML

8 Comments(s)

Copy linkTweet thisAlerts:
@aj_nscNov 30.2010 — When you say "open it" - what do you mean? Double click the icon? Open it in a web browser? What?

If you're using notepad, just make sure that when you save it you save it as a .html file.
Copy linkTweet thisAlerts:
@OctoberWindNov 30.2010 — Try adding a DOCTYPE, put your css <style> block inside <head> tags above the <body>, and make sure the file is saved as .html

Otherwise, if you can copy/paste it into a new file and it works... why not just use that new file?

Also, if you run it through the W3C Validator, you can fix a few things that might make it "quirky" (aside from the no-doctype quirks mode).
Copy linkTweet thisAlerts:
@stefanrajDec 02.2010 — Hi,

As aj_nsc said Please make sure about the extension of the file whether it is saved with extension .html (or .htm) or not.
Copy linkTweet thisAlerts:
@shrikrishnatechDec 07.2010 — why you using notepad there is lots of html editor through which you can easily create and edit HTML pages so try to use that


Web Design Company
Copy linkTweet thisAlerts:
@aj_nscDec 07.2010 — Nothing wrong with using notepad. That's what way I built sites for years. I use Notepad++ in about the same way except I use it for its syntax highlighting functionalities, although with different plugins it can be used for a lot more than that.
Copy linkTweet thisAlerts:
@VarixDec 07.2010 — ok so i need more information about when you open it..

are you opening it on your computer? if so then I agree with the above statements make sure you are saving it as .html file... may i also recomend notepad++ http://notepad-plus-plus.org/ as a html editor for you? it will make your life easier, you wont have file type errors and it will colour code your tags for better tracking.

are you opening it on your websever? might want to check your .httaccess and make sure its setup correctly.

are you opening it up in a mail client? you said it was for a newsletter or something. when you are making html emails its not as simple as pasting in the code and sending it. you have to change the out going header to be read as html, or the client side reciever will assume its all text. there are options to change this in outlook and thunderbird.

hope one of those helps...
Copy linkTweet thisAlerts:
@tom_myDec 07.2010 — I believe notepad isn't good app to write html code in. I've read that it can put some utf symbol or something like that at the begining of the file, so html won't work properly. So, put a doctype in your file and validate it.
Copy linkTweet thisAlerts:
@noahqwDec 08.2010 — What's the name of the file extension you have this HTML code inside of, also which browser are you using to view this page?
×

Success!

Help @athard spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...