Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <link rel="stylesheet" href="styles.css">
  <link rel="preconnect" href="https://fonts.googleapis.com" />
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
  <link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;1,400;1,500&display=swap" rel="stylesheet">
  <title>Invoice Template</title>
</head>

<body>
  <!-- Header -->
  <table width="100%" border="0" cellpadding="0" cellspacing="0" align="center" class="fullTable">
    <tr>
      <td height="20"></td>
    </tr>
    <tr>
      <td>
        <table border="0" cellpadding="0" cellspacing="0" align="center" class="fullTable" bgcolor="#ffffff" style="border-radius: 10px 10px 0 0">
          <tr class="hiddenMobile">
            <td height="40"></td>
          </tr>
          <tr class="visibleMobile">
            <td height="30"></td>
          </tr>
          <tr>
            <td>
              <table width="480" border="0" cellpadding="0" cellspacing="0" align="center" class="fullPadding">
                <tbody>
                  <tr>
                    <td style="display:flex">
                      <table width="220" border="0" cellpadding="0" cellspacing="0" align="left" class="col">
                        <tbody>
                          <tr>
                            <td class="brand-logo" align="left">
                              <img src="http://www.zylker.com/zf-logo-mark%20copy.png" width="32" height="32" alt="logo" border="0" />
                              <h4>{{ brand_name }}</h4>
                            </td>
                          </tr>
                          <tr class="hiddenMobile">
                            <td height="40"></td>
                          </tr>
                          <tr class="visibleMobile">
                            <td height="20"></td>
                          </tr>
                          <tr>
                            <td style="
                                  font-size: 12px;
                                  color: #5b5b5b;
                                  font-family: 'Open Sans', sans-serif;
                                  line-height: 18px;
                                  vertical-align: top;
                                  text-align: left;
                                ">
                              <div style="color:black">Hello, {{customer_name}}.</div>
                              <br />
                              Thank you for shopping from our store and for
                              your order.
                            </td>
                          </tr>
                        </tbody>
                      </table>
                      <table width="220" border="0" cellpadding="0" cellspacing="0" align="right" class="col">
                        <tbody>
                          <tr class="visibleMobile">
                            <td height="20"></td>
                          </tr>
                          <tr>
                            <td height="5"></td>
                          </tr>
                          <tr>
                            <td style="
                                  font-size: 21px;
                                  color: #ff0000;
                                  letter-spacing: -1px;
                                  font-family: 'Open Sans', sans-serif;
                                  line-height: 1;
                                  vertical-align: top;
                                  text-align: right;
                                ">
                              Invoice
                            </td>
                          </tr>
                          <tr></tr>
                          <tr class="hiddenMobile">
                            <td height="50"></td>
                          </tr>
                          <tr class="visibleMobile">
                            <td height="20"></td>
                          </tr>
                          <tr>
                            <td style="
                                  font-size: 12px;
                                  color: #5b5b5b;
                                  font-family: 'Open Sans', sans-serif;
                                  line-height: 18px;
                                  vertical-align: top;
                                  text-align: right;
                                ">
                              <small>ORDER</small> #1234567<br />
                              <small>APRIL 1ST 2023</small>
                            </td>
                          </tr>
                        </tbody>
                      </table>
                    </td>
                  </tr>
                </tbody>
              </table>
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  <!-- /Header -->
  <!-- Order Details -->
  <table width="100%" border="0" cellpadding="0" cellspacing="0" align="center" class="fullTable">
    <tbody>
      <tr>
        <td>
          <table border="0" cellpadding="0" cellspacing="0" align="center" class="fullTable" bgcolor="#ffffff">
            <tbody>
              <tr></tr>
              <tr class="hiddenMobile">
                <td height="60"></td>
              </tr>
              <tr class="visibleMobile">
                <td height="40"></td>
              </tr>
              <tr>
                <td>
                  <table width="480" border="0" cellpadding="0" cellspacing="0" align="center" class="fullPadding">
                    <tbody>
                      <tr>
                        <th style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: #5b5b5b;
                              font-weight: normal;
                              line-height: 1;
                              vertical-align: top;
                              padding: 0 10px 7px 0;
                            " width="52%" align="left">
                          Item
                        </th>
                        <th style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: #5b5b5b;
                              font-weight: normal;
                              line-height: 1;
                              vertical-align: top;
                              padding: 0 0 7px;
                            " align="left">
                          <small>Unit</small>
                        </th>
                        <th style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: #5b5b5b;
                              font-weight: normal;
                              line-height: 1;
                              vertical-align: top;
                              padding: 0 0 7px;
                            " align="center">
                          Quantity
                        </th>
                        <th style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: #1e2b33;
                              font-weight: normal;
                              line-height: 1;
                              vertical-align: top;
                              padding: 0 0 7px;
                            " align="right">
                          Subtotal
                        </th>
                      </tr>
                      <tr>
                        <td height="1" style="background: #bebebe" colspan="4"></td>
                      </tr>
                      <tr>
                        <td height="10" colspan="4"></td>
                      </tr>
                      <tr>
                        <td style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: black;
                              line-height: 18px;
                              vertical-align: top;
                              padding: 10px 0;
                            " class="article">
                          Dummy Product 1
                        </td>
                        <td style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: #646a6e;
                              line-height: 18px;
                              vertical-align: top;
                              padding: 10px 0;
                            ">
                          <small>1</small>
                        </td>
                        <td style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: #646a6e;
                              line-height: 18px;
                              vertical-align: top;
                              padding: 10px 0;
                            " align="center">
                          1
                        </td>
                        <td style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: #1e2b33;
                              line-height: 18px;
                              vertical-align: top;
                              padding: 10px 0;
                            " align="right">
                          $100
                        </td>
                      </tr>
                      <tr>
                        <td height="1" colspan="4" style="border-bottom: 1px solid #e4e4e4"></td>
                      </tr>

                      <tr>
                        <td style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: black;
                              line-height: 18px;
                              vertical-align: top;
                              padding: 10px 0;
                            " class="article">
                          Dummy Product 2
                        </td>
                        <td style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: #646a6e;
                              line-height: 18px;
                              vertical-align: top;
                              padding: 10px 0;
                            ">
                          <small>1</small>
                        </td>
                        <td style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: #646a6e;
                              line-height: 18px;
                              vertical-align: top;
                              padding: 10px 0;
                            " align="center">
                          1
                        </td>
                        <td style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: #1e2b33;
                              line-height: 18px;
                              vertical-align: top;
                              padding: 10px 0;
                            " align="right">
                          $100
                        </td>
                      </tr>
                      <tr>
                        <td height="1" colspan="4" style="border-bottom: 1px solid #e4e4e4"></td>
                      </tr>
                      <tr>
                        <td style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: black;
                              line-height: 18px;
                              vertical-align: top;
                              padding: 10px 0;
                            " class="article">
                          Dummy Product 3
                        </td>
                        <td style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: #646a6e;
                              line-height: 18px;
                              vertical-align: top;
                              padding: 10px 0;
                            ">
                          <small>1</small>
                        </td>
                        <td style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: #646a6e;
                              line-height: 18px;
                              vertical-align: top;
                              padding: 10px 0;
                            " align="center">
                          1
                        </td>
                        <td style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: #1e2b33;
                              line-height: 18px;
                              vertical-align: top;
                              padding: 10px 0;
                            " align="right">
                          $100
                        </td>
                      </tr>
                      <tr>
                        <td height="1" colspan="4" style="border-bottom: 1px solid #e4e4e4"></td>
                      </tr>
                      <tr>
                        <td style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: black;
                              line-height: 18px;
                              vertical-align: top;
                              padding: 10px 0;
                            " class="article">
                          Dummy Product 4
                        </td>
                        <td style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: #646a6e;
                              line-height: 18px;
                              vertical-align: top;
                              padding: 10px 0;
                            ">
                          <small>1</small>
                        </td>
                        <td style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: #646a6e;
                              line-height: 18px;
                              vertical-align: top;
                              padding: 10px 0;
                            " align="center">
                          1
                        </td>
                        <td style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: #1e2b33;
                              line-height: 18px;
                              vertical-align: top;
                              padding: 10px 0;
                            " align="right">
                          $100
                        </td>
                      </tr>
                      <tr>
                        <td height="1" colspan="4" style="border-bottom: 1px solid #e4e4e4"></td>
                      </tr>
                    </tbody>
                  </table>
                </td>
              </tr>
              <tr>
                <td height="20"></td>
              </tr>
            </tbody>
          </table>
        </td>
      </tr>
    </tbody>
  </table>
  <!-- /Order Details -->
  <!-- Total -->
  <table width="100%" border="0" cellpadding="0" cellspacing="0" align="center" class="fullTable">
    <tbody>
      <tr>
        <td>
          <table border="0" cellpadding="0" cellspacing="0" align="center" class="fullTable" bgcolor="#ffffff">
            <tbody>
              <tr>
                <td>
                  <!-- Table Total -->
                  <table width="480" border="0" cellpadding="0" cellspacing="0" align="center" class="fullPadding">
                    <tbody>
                      <tr>
                        <td style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: #646a6e;
                              line-height: 22px;
                              vertical-align: top;
                              text-align: right;
                            ">
                          Subtotal
                        </td>
                        <td style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: #646a6e;
                              line-height: 22px;
                              vertical-align: top;
                              text-align: right;
                              white-space: nowrap;
                            " width="80">
                          $400
                        </td>
                      </tr>
                      <tr>
                        <td style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: #646a6e;
                              line-height: 22px;
                              vertical-align: top;
                              text-align: right;
                            ">
                          Shipping &amp; Handling
                        </td>
                        <td style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: #646a6e;
                              line-height: 22px;
                              vertical-align: top;
                              text-align: right;
                            ">
                          $50
                        </td>
                      </tr>
                      <tr>
                        <td style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: #000;
                              line-height: 22px;
                              vertical-align: top;
                              text-align: right;
                            ">
                          <strong>Grand Total (Incl.Tax)</strong>
                        </td>
                        <td style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: #000;
                              line-height: 22px;
                              vertical-align: top;
                              text-align: right;
                            ">
                          <strong>$450</strong>
                        </td>
                      </tr>
                      <tr>
                        <td style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: #b0b0b0;
                              line-height: 22px;
                              vertical-align: top;
                              text-align: right;
                            ">
                          <small>TAX</small>
                        </td>
                        <td style="
                              font-size: 12px;
                              font-family: 'Open Sans', sans-serif;
                              color: #b0b0b0;
                              line-height: 22px;
                              vertical-align: top;
                              text-align: right;
                            ">
                          <small>$40</small>
                        </td>
                      </tr>
                    </tbody>
                  </table>
                  <!-- /Table Total -->
                </td>
              </tr>
            </tbody>
          </table>
        </td>
      </tr>
    </tbody>
  </table>
  <!-- /Total -->
  <!-- Information -->
  <table width="100%" border="0" cellpadding="0" cellspacing="0" align="center" class="fullTable">
    <tbody>
      <tr>
        <td>
          <table border="0" cellpadding="0" cellspacing="0" align="center" class="fullTable">
            <tbody>
              <tr></tr>
              <tr class="hiddenMobile">
                <td height="60"></td>
              </tr>
              <tr class="visibleMobile">
                <td height="40"></td>
              </tr>
              <tr>
                <td>
                  <table width="480" border="0" cellpadding="0" cellspacing="0" align="center" class="fullPadding">
                    <tbody>
                      <tr>
                        <td style="display:flex">
                          <table width="220" border="0" cellpadding="0" cellspacing="0" align="left" class="col">
                            <tbody>
                              <tr>
                                <td style="
                                      font-size: 11px;
                                      font-family: 'Open Sans', sans-serif;
                                      color: black;
                                      line-height: 1;
                                      vertical-align: top;
                                    ">
                                  <strong>BILLING INFORMATION</strong>
                                </td>
                              </tr>
                              <tr>
                                <td width="100%" height="10"></td>
                              </tr>
                              <tr>
                                <td style="
                                      font-size: 12px;
                                      font-family: 'Open Sans', sans-serif;
                                      color: #5b5b5b;
                                      line-height: 20px;;      
                                      vertical-align: top;
                                    ">
                                  <p style="width:200px; word-wrap: break-word;">
                                    XXXXXXXXXXXXXXX, XXXXXXXXXX, XXXXXXXX
                                  </p>
                                </td>
                              </tr>
                            </tbody>
                          </table>

                          <table width="220" border="0" cellpadding="0" cellspacing="0" align="right" class="col">
                            <tbody>
                              <tr class="visibleMobile">
                                <td height="20"></td>
                              </tr>
                              <tr>
                                <td style="
                                      font-size: 11px;
                                      font-family: 'Open Sans', sans-serif;
                                      color: black;
                                      line-height: 1;
                                      vertical-align: top;
                                    ">
                                  <strong>PAYMENT METHOD</strong>
                                </td>
                              </tr>
                              <tr>
                                <td width="100%" height="10"></td>
                              </tr>
                              <tr>
                                <td style="
                                      font-size: 12px;
                                      font-family: 'Open Sans', sans-serif;
                                      color: #5b5b5b;
                                      line-height: 20px;
                                      vertical-align: top;
                                    ">
                                  Type: Credit Card<br />

                                </td>
                              </tr>
                            </tbody>
                          </table>
                        </td>
                      </tr>
                    </tbody>
                  </table>
                </td>
              </tr>
              <tr>
                <td>
                  <table width="480" border="0" cellpadding="0" cellspacing="0" align="center" class="fullPadding">
                    <tbody>
                      <tr>
                        <td style="display:flex">
                          <table width="220" border="0" cellpadding="0" cellspacing="0" align="left" class="col">
                            <tbody>
                              <tr class="hiddenMobile">
                                <td height="35"></td>
                              </tr>
                              <tr class="visibleMobile">
                                <td height="20"></td>
                              </tr>
                              <tr>
                                <td style="
                                      font-size: 11px;
                                      font-family: 'Open Sans', sans-serif;
                                      color: black;
                                      line-height: 1;
                                      vertical-align: top;
                                    ">
                                  <strong>SHIPPING INFORMATION</strong>
                                </td>
                              </tr>
                              <tr>
                                <td width="100%" height="10"></td>
                              </tr>
                              <tr>
                                <td style="
                                      font-size: 12px;
                                      font-family: 'Open Sans', sans-serif;
                                      color: #5b5b5b;
                                      line-height: 20px;
                                      vertical-align: top;
                                    ">
                                  <p style="width:200px; word-wrap: break-word;">
                                    XXXXXXXXXXXXXXX, XXXXXXXXXX, XXXXXXXX
                                  </p>
                                </td>
                              </tr>
                            </tbody>
                          </table>

                          <table width="220" border="0" cellpadding="0" cellspacing="0" align="right" class="col">
                            <tbody>
                              <tr class="hiddenMobile">
                                <td height="35"></td>
                              </tr>
                              <tr class="visibleMobile">
                                <td height="20"></td>
                              </tr>
                              <tr>
                                <td style="
                                      font-size: 11px;
                                      font-family: 'Open Sans', sans-serif;
                                      color: black;
                                      line-height: 1;
                                      vertical-align: top;
                                    ">
                                  <strong>SHIPPING METHOD</strong>
                                </td>
                              </tr>
                              <tr>
                                <td width="100%" height="10"></td>
                              </tr>
                              <tr>
                                <td style="
                                      font-size: 12px;
                                      font-family: 'Open Sans', sans-serif;
                                      color: #5b5b5b;
                                      line-height: 20px;
                                      vertical-align: top;
                                    ">
                                  Mail
                                </td>
                              </tr>
                            </tbody>
                          </table>
                        </td>
                      </tr>
                    </tbody>
                  </table>
                </td>
              </tr>
              <tr class="hiddenMobile">
                <td height="60"></td>
              </tr>
              <tr class="visibleMobile">
                <td height="30"></td>
              </tr>
            </tbody>
          </table>
        </td>
      </tr>
    </tbody>
  </table>
</body>
              
            
!

CSS

              
                body {
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
  background-color: white;
}
div,
p,
a,
li,
td {
  -webkit-text-size-adjust: none;
}

.fullTable {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  border-collapse: collapse;
}

html {
  width: 100%;
}

.visibleMobile {
  display: none;
}
.hiddenMobile {
  display: block;
}

@media only screen and (max-width: 600px) {
  body {
    width: auto !important;
  }
  table[class="fullTable"] {
    width: 96% !important;
    clear: both;
  }
  table[class="fullPadding"] {
    width: 85% !important;
    clear: both;
  }
  table[class="col"] {
    width: 45% !important;
  }
  .erase {
    display: none;
  }
}

@media only screen and (max-width: 420px) {
  table[class="fullTable"] {
    width: 100% !important;
    clear: both;
  }
  table[class="fullPadding"] {
    width: 85% !important;
    clear: both;
  }
  table[class="col"] {
    width: 100% !important;
    clear: both;
  }
  table[class="col"] td {
    text-align: left !important;
  }
  .erase {
    display: none;
    font-size: 0;
    max-height: 0;
    line-height: 0;
    padding: 0;
  }
  .visibleMobile {
    display: block !important;
  }
  .hiddenMobile {
    display: none !important;
  }
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-logo > img {
  width: 40px;
  height: auto;
}

table {
  width: 100%;
}

              
            
!

JS

              
                
              
            
!
999px

Console