HTML questions from a newbie... really appreciate the help. Feel overwhelmed

Hey all! first off I really do appreciate all the help here. I am new to HTML so I am learning the ropes still.

So my goal is to create an email for Pardot (prefer to custom create it).

I have come up with this so far with this: https://www.dropbox.com/s/znevpvhl0i89v65/plantilla.txt?dl=0

The problem is, it doesn’t look anything like my goal : https://www.dropbox.com/s/rrrd3arf5m3obkz/Email%20template%20for%20blogs%20(4).jpg?dl=0

I think I am missing a few main things

  1. Make the gray background a little thinner on the sides with a white outline.
  2. Curve the gray edges on the corners.
  3. Make one white space for the banner with a thin gray line below, then another white space for the next.
  4. The white spaces for the next and banner have a gray outline to show depth perception.

Thanks a lot for the help! couldnt do it without you!!!

We can tell you what changes to make to get your code reflecting your vision, but there are grave underlying problems.

  1. You are using tables to structure your layout. You should use tables only for tabular data.

  2. Your layout is a fixed layout rather than responsive design. This means it will not scale well on mobile devices.

If you are only practicing, then it’s understandable that you must start somewhere; however, using tables to establish your layout is developing very bad habit from the beginning.

1 Like

Welcome to the forums, @gorhamsj

My understanding was that tables are still required for email layout, which is what the member is asking about. Is this not the case?

1 Like

Thank you very much for the quick reply! I am just trying to learn and doing as much self teaching as possible. I joined this company and want to show a positive impression that I am adaptable. If it is not a bother would you mind helping me with the changes?

So I am just trying to replicate that email which i included in the dropbox.

  1. Make a gray background (with white surrounding)
  2. 2 white squares
  3. A little depth perception

Thank you very much again for your help!!

That is indeed the case! That part of the OP went over my head when I examined the code. My bad.

1 Like

Indeed it is, and I’m not sure that an HTML email has a doctype, HTML or BODY tags or a HEAD section.

Hey!
Thanks for your quick response. I dont know what is the best for this. I feel a simple email template would be the easiest where I can write a small email and include a banner. What would you suggest?
Thanks

Hi there @gorhamsj

Below is an email template I found some while ago if it’s of any help. (It seems to suggest my comments earlier are incorrect!.)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Demystifying Email Design</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body style="margin: 0; padding: 0;">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td style="padding: 10px 0 30px 0;"><table align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="border: 1px solid #cccccc; border-collapse: collapse;">
        <tr>
          <td align="center" bgcolor="#70bbd9" style="padding: 40px 0 30px 0; color: #153643; font-size: 28px; font-weight: bold; font-family: Arial, sans-serif;"><img src="images/h1.gif" alt="Creating Email Magic" width="300" height="230" style="display: block;" /> </td>
        </tr>
        <tr>
          <td bgcolor="#ffffff" style="padding: 40px 30px 40px 30px;"><table border="0" cellpadding="0" cellspacing="0" width="100%">
              <tr>
                <td style="color: #153643; font-family: Arial, sans-serif; font-size: 24px;"><b>Lorem
                    ipsum dolor sit amet!</b> </td>
              </tr>
              <tr>
                <td style="padding: 20px 0 30px 0; color: #153643; font-family: Arial, sans-serif; font-size: 16px; line-height: 20px;"> Lorem
                  ipsum dolor sit amet, consectetur adipiscing elit. In tempus adipiscing felis,
                  sit amet blandit ipsum volutpat sed. Morbi porttitor, eget accumsan dictum, nisi
                  libero ultricies ipsum, in posuere mauris neque at erat. </td>
              </tr>
              <tr>
                <td><table border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                      <td width="260" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100%">
                          <tr>
                            <td><img src="images/left.gif" alt="" width="100%" height="140" style="display: block;" /> </td>
                          </tr>
                          <tr>
                            <td style="padding: 25px 0 0 0; color: #153643; font-family: Arial, sans-serif; font-size: 16px; line-height: 20px;"> Lorem
                              ipsum dolor sit amet, consectetur adipiscing elit. In tempus adipiscing
                              felis, sit amet blandit ipsum volutpat sed. Morbi porttitor, eget accumsan
                              dictum, nisi libero ultricies ipsum, in posuere mauris neque at erat. </td>
                          </tr>
                        </table></td>
                      <td style="font-size: 0; line-height: 0;" width="20">&nbsp;</td>
                      <td width="260" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100%">
                          <tr>
                            <td><img src="images/right.gif" alt="" width="100%" height="140" style="display: block;" /> </td>
                          </tr>
                          <tr>
                            <td style="padding: 25px 0 0 0; color: #153643; font-family: Arial, sans-serif; font-size: 16px; line-height: 20px;"> Lorem
                              ipsum dolor sit amet, consectetur adipiscing elit. In tempus adipiscing
                              felis, sit amet blandit ipsum volutpat sed. Morbi porttitor, eget accumsan
                              dictum, nisi libero ultricies ipsum, in posuere mauris neque at erat. </td>
                          </tr>
                        </table></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
        <tr>
          <td bgcolor="#ee4c50" style="padding: 30px 30px 30px 30px;"><table border="0" cellpadding="0" cellspacing="0" width="100%">
              <tr>
                <td style="color: #ffffff; font-family: Arial, sans-serif; font-size: 14px;" width="75%">&reg; Someone,
                  somewhere 2013<br/>
                  <a href="#" style="color: #ffffff;"><font color="#ffffff">Unsubscribe</font></a> to
                  this newsletter instantly </td>
                <td align="right" width="25%"><table border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td style="font-family: Arial, sans-serif; font-size: 12px; font-weight: bold;"><a href="http://www.twitter.com/" style="color: #ffffff;"> <img src="images/tw.gif" alt="Twitter" width="38" height="38" style="display: block;" border="0" /> </a> </td>
                      <td style="font-size: 0; line-height: 0;" width="20">&nbsp;</td>
                      <td style="font-family: Arial, sans-serif; font-size: 12px; font-weight: bold;"><a href="http://www.twitter.com/" style="color: #ffffff;"> <img src="images/fb.gif" alt="Facebook" width="38" height="38" style="display: block;" border="0" /> </a> </td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>

As you can probably guess from my earlier question, I don’t send HTML emails, and consequently I’m extremely rusty when it comes to using tables for layout. Fortunately, there are others around who should be better able to assist you, but if all else fails, I can have a go at it tomorrow.

Thank you for the reply!! I do appreciate it! I think I could figure out how to change the colors of the boxes. Last question, how could i take out the columns in the main square to just have one body of text?

Thanks

Hey! So I am sending these emails through pardot. Would you not suggest HTML. It looks like there is a HTML part where I write the structure of it.
Thanks

If you need that kind of look, as per the image, as opposed to plain text, then you will want to use html with styling.

I would not go so far as to say required. I think it’s more a case of it is still considered acceptable to utilise tables for layout in emails.
The reason being that email clients are something of an unknown, more so than (modern) browsers when it comes to css support. The fear is that some email clients are still in the 90s when it comes to css and don’t support modern layout systems, so people revert to 90s style coding.
In truth some clients do support a lot more css than others, but I suppose the “others” are still there. I recall reading an article a while back that said this way of thinking about emails is now out-dated, which I think is true to an extent. But I honestly don’t know all the email clients and how well they all handle css.

Looking at the actual layout mock-up, it looks to be a single column, so you may well not require a table to achieve it, even with “Luddite” code.
And that’s a god point: just where do you draw the line to what level of css is too new for email?

1 Like

Just glanced at the code and one important point that jumped straight out at me was that you have relative paths to your images.
That’s not going to work in a email, you need absolute paths with the full URL.

Sorry I am so new at this. I am learning. What does that mean? Thanks @SamA74

Depending on the particular design you’re looking for, you would need to remove one or more of the inner tables, and probably the 2 <td>s of width 260. It can be difficult finding where one table ends and another begins sometimes which is one reason this design technique is no longer used for web pages.

Where you have an image (img) element the source attribute looks like this:-

src="images/top-shadow-basica.png"

That shows the location of the source image relative to the HTML file, wherever it may exist.
That is fine if the html exists on a your own computer or your (host’s) web server.
But as an email it will be on the recipient’s computer, where such a file is not likely to exist, so will not be found.
So you must use an absolute URL like:-

src="https://www.example.com/images/top-shadow-basica.png"

Because the image exists somewhere on the web, you need its full web address.

1 Like

That’s shown in the image, it appears to be a single column design, so could probably do away with tables altogether, that would make the code a lot more readable.

Thank you very much!!!

Thank you very much!!! I appreciate it!!!

1 Like

I think this is a little closer to what you are after:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Email Newsletter</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body style="margin: 0; padding: 0;">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td style="padding: 10px 0 30px 0;"><table align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="border: 1px solid #cccccc; border-collapse: collapse;">
        <tr>
          <td align="center" bgcolor="#70bbd9" style="padding: 30px 0 30px 0; color: #153643; font-size: 28px; font-weight: bold; font-family: arial, sans-serif;"> Email
            Newsletter </td>
        </tr>
        <tr>
          <td bgcolor="#ffffff" style="padding: 25px 30px 30px 30px;"><table border="0" cellpadding="0" cellspacing="0" width="100%">
              <tr>
                <td style="color: #153643; font-family: arial, sans-serif; font-size: 24px;"><b>Lorem
                    ipsum dolor sit amet!</b> </td>
              </tr>
              <tr>
                <td style="padding: 20px 0 30px 0; color: #153643; font-family: arial, sans-serif; font-size: 16px; line-height: 20px;"> <p>Lorem
                  ipsum dolor sit amet, consectetur adipiscing elit. In tempus adipiscing felis,
                  sit amet blandit ipsum volutpat sed. Morbi porttitor, eget accumsan dictum, nisi
                  libero ultricies ipsum, in posuere mauris neque at erat. </p>
                  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In tempus adipiscing
                    felis, sit amet blandit ipsum volutpat sed. Morbi porttitor, eget accumsan dictum,
                  nisi libero ultricies ipsum, in posuere mauris neque at erat. </p>
                  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In tempus adipiscing
                    felis, sit amet blandit ipsum volutpat sed. Morbi porttitor, eget accumsan dictum,
                  nisi libero ultricies ipsum, in posuere mauris neque at erat. </p>
                  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In tempus adipiscing
                    felis, sit amet blandit ipsum volutpat sed. Morbi porttitor, eget accumsan dictum,
                  nisi libero ultricies ipsum, in posuere mauris neque at erat. </p>
                  </td>
              </tr>
            </table></td>
        </tr>
        <tr>
          <td bgcolor="#ee4c50" style="padding: 20px 30px 20px 30px;"><table border="0" cellpadding="0" cellspacing="0" width="100%">
              <tr>
                <td style="color: #ffffff; font-family: arial, sans-serif; font-size: 14px;" width="75%"><a href="http://www.domain.eu/" style="color: #ffffff;"><font color="#ffffff">Love
                      From Me</font></a>, 2014 </td>
                <td align="right" width="25%"><table border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td>&nbsp;</td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>