semicolon & HTML Emails
- Started
- Last post
- 7 Responses
- Dancer
This is a strange one and I wonder if anyone can help me?
A client of mine has handed me the HTML code for a newsletter they send out plus new content. This is usually handled by a particular company but they can not do it in the time period.
When I look at the code all looks fine except on all the inline styles the final style is missing the semicolon. I there a reason for this? It seems strange that it happens on the final style of every bit of code.
e.g:
<td width="330" style="padding-left: 5px; width: 330px">
<a style="text-decoration: none" href="http://www.website.com/">
<font color="#910d00" size="2" face="Helvetica Neue,Arial,Helvetica,Sans-Serif" style="font-family: 'Helvetica Neue',Arial,Helvetica,Sans-Serif; color: #ff9100; font-size: 12px">
Blah Blah. We speak your language.
</font>
</a>
</td>^Dunno if this will work
- schjetne0
That's completely fine, mate. You don't strictly need the semi colon if you don't have a new style immediately after.
- Dancer0
Really?
wow I thought you had to close them all.Guess I will take them all back out again. Thanks
- stewart0
<strong>Blah Blah. We speak your language.</strong>
?
- moth0
Yeah that's normal I believe. Had me stumped once but then through deduction I saw it made no difference to validation.
Anyway - it's HTML email, it's all over the place by default. I mean 'font' tags.... really...
- Stugoo0
I think your suppose to semi colon them all but i sometimes dont....
had a debate with a colleague about this, he claimed it borks some stuff however I failed to find any evidence...
yeah should be fine.
- bulletfactory0
i agree - a semicolon for the last style in a declaration is unnecessary, though it IS good practice to add anyway. In the event you start adding new styles beneath later and neglect to remember to add it back to the previous you'd have issues.
- schjetne0
Good practice, but not strictly necessary.