Files
game-fe-agent/skills/markup-edm/references/html-patterns.md

11 KiB

EDM HTML 코드 패턴 모음


1컬럼 레이아웃 (전체 템플릿)

<!DOCTYPE html>
<html lang="ko">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="format-detection" content="telephone=no, date=no, address=no">
  <title>이메일 제목</title>
  <!--[if mso]>
  <style type="text/css">
    body, table, td, p, a { font-family: Arial, sans-serif !important; }
  </style>
  <![endif]-->
  <style type="text/css">
    body { margin: 0; padding: 0; width: 100%; background-color: #f5f5f5; }
    table { border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; }
    img { display: block; border: 0; outline: none; text-decoration: none; }
    a { color: inherit; }

    @media only screen and (max-width: 600px) {
      .container { width: 100% !important; }
      .mobile-full { width: 100% !important; display: block !important; }
      .mobile-padding { padding-left: 16px !important; padding-right: 16px !important; }
      .mobile-center { text-align: center !important; }
      .mobile-img { width: 100% !important; height: auto !important; }
    }
  </style>
</head>
<body style="margin: 0; padding: 0; background-color: #f5f5f5;">

  <table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#f5f5f5">
    <tr>
      <td align="center" style="padding-top: 20px; padding-bottom: 20px;">

        <table width="600" cellpadding="0" cellspacing="0" border="0"
               class="container"
               style="width: 600px; max-width: 100%; background-color: #ffffff;">

          <!-- 헤더 -->
          <tr>
            <td align="center"
                style="padding-top: 24px; padding-bottom: 24px;
                       padding-left: 30px; padding-right: 30px;
                       border-bottom: 1px solid #e5e7eb;">
              <img src="https://cdn.example.com/logo.png"
                   alt="회사 로고" width="120" height="40"
                   style="display: block; border: 0;">
            </td>
          </tr>

          <!-- 히어로 이미지 -->
          <tr>
            <td style="padding: 0; line-height: 0;">
              <img src="https://cdn.example.com/hero.jpg"
                   alt="이벤트 배너"
                   width="600" height="280"
                   class="mobile-img"
                   style="display: block; width: 100%; max-width: 600px;
                          height: auto; border: 0;">
            </td>
          </tr>

          <!-- 본문 -->
          <tr>
            <td style="padding-top: 32px; padding-bottom: 32px;
                       padding-left: 32px; padding-right: 32px;"
                class="mobile-padding">
              <h1 style="font-family: Arial, sans-serif;
                         font-size: 24px; font-weight: bold;
                         color: #111827; line-height: 1.3;
                         margin: 0 0 16px 0;">
                이메일 제목이 여기 들어갑니다
              </h1>
              <p style="font-family: Arial, sans-serif;
                        font-size: 15px; color: #374151;
                        line-height: 1.7;
                        margin: 0 0 24px 0;">
                본문 내용이 여기 들어갑니다. 가독성을 위해 line-height를
                1.5 이상으로 설정하는 것이 좋습니다.
              </p>

              <!-- CTA 버튼 -->
              <div style="text-align: center;">
                <!--[if mso]>
                <v:roundrect xmlns:v="urn:schemas-microsoft-com:vml"
                             xmlns:w="urn:schemas-microsoft-com:office:word"
                             href="https://example.com"
                             style="height: 48px; v-text-anchor: middle; width: 200px;"
                             arcsize="8%" stroke="f" fillcolor="#1a56db">
                  <w:anchorlock/>
                  <center style="color: #ffffff; font-family: Arial, sans-serif;
                                 font-size: 16px; font-weight: bold;">
                    자세히 보기
                  </center>
                </v:roundrect>
                <![endif]-->
                <!--[if !mso]><!-->
                <a href="https://example.com"
                   style="background-color: #1a56db; color: #ffffff;
                          display: inline-block;
                          padding-top: 14px; padding-bottom: 14px;
                          padding-left: 32px; padding-right: 32px;
                          text-decoration: none; border-radius: 6px;
                          font-family: Arial, sans-serif;
                          font-size: 16px; font-weight: bold;">
                  자세히 보기
                </a>
                <!--<![endif]-->
              </div>
            </td>
          </tr>

          <!-- 푸터 -->
          <tr>
            <td bgcolor="#f9fafb"
                style="background-color: #f9fafb;
                       border-top: 1px solid #e5e7eb;
                       padding-top: 24px; padding-bottom: 24px;
                       padding-left: 32px; padding-right: 32px;
                       text-align: center;">
              <p style="font-family: Arial, sans-serif; font-size: 12px;
                        color: #9ca3af; line-height: 1.6; margin: 0 0 8px 0;">
                <strong>회사명</strong> | 서울시 강남구 테헤란로 123
              </p>
              <p style="font-family: Arial, sans-serif; font-size: 12px;
                        color: #9ca3af; line-height: 1.6; margin: 0;">
                <a href="https://example.com/unsubscribe"
                   style="color: #9ca3af; text-decoration: underline;">
                  수신거부
                </a>
                &nbsp;|&nbsp;
                <a href="https://example.com/privacy"
                   style="color: #9ca3af; text-decoration: underline;">
                  개인정보처리방침
                </a>
              </p>
            </td>
          </tr>

        </table>
      </td>
    </tr>
  </table>

</body>
</html>

2컬럼 이미지 + 텍스트

<table width="600" cellpadding="0" cellspacing="0" border="0"
       style="width: 600px;">
  <tr>
    <!-- 이미지 열 (40%) -->
    <td width="220" valign="top"
        style="width: 220px; padding-right: 0;"
        class="mobile-full">
      <img src="https://cdn.example.com/product.jpg"
           alt="상품명" width="220" height="220"
           class="mobile-img"
           style="display: block; width: 100%; height: auto; border: 0;">
    </td>

    <!-- 간격 -->
    <td width="20" style="width: 20px; min-width: 20px;">&nbsp;</td>

    <!-- 텍스트 열 (60%) -->
    <td width="360" valign="top"
        style="width: 360px; padding-top: 8px;"
        class="mobile-full mobile-padding">
      <h2 style="font-family: Arial, sans-serif;
                 font-size: 18px; font-weight: bold;
                 color: #111827; margin: 0 0 8px 0;
                 line-height: 1.3;">
        상품명
      </h2>
      <p style="font-family: Arial, sans-serif; font-size: 14px;
                color: #6b7280; line-height: 1.6;
                margin: 0 0 16px 0;">
        상품 설명이 들어갑니다. 간결하게 핵심만 작성하세요.
      </p>
      <p style="font-family: Arial, sans-serif; font-size: 20px;
                font-weight: bold; color: #ef4444;
                margin: 0 0 16px 0;">
        ₩29,900
      </p>
      <a href="https://example.com/product"
         style="background-color: #111827; color: #ffffff;
                display: inline-block;
                padding-top: 10px; padding-bottom: 10px;
                padding-left: 20px; padding-right: 20px;
                text-decoration: none; border-radius: 4px;
                font-family: Arial, sans-serif;
                font-size: 13px; font-weight: bold;">
        구매하기
      </a>
    </td>
  </tr>
</table>

헤더 배너 (이미지 기반)

이미지가 차단됐을 때도 배경색이 보이도록 bgcolor 속성을 함께 지정합니다:

<table width="600" cellpadding="0" cellspacing="0" border="0"
       style="width: 600px;">
  <tr>
    <td bgcolor="#1a56db" style="background-color: #1a56db; line-height: 0; padding: 0;">
      <img src="https://cdn.example.com/header-banner.jpg"
           alt="여름 세일 최대 70% 할인"
           width="600" height="240"
           style="display: block; width: 100%; max-width: 600px;
                  height: auto; border: 0;">
    </td>
  </tr>
</table>

섹션 구분선

<!-- 섹션 간 여백 -->
<tr>
  <td height="32" style="height: 32px; line-height: 32px;">&nbsp;</td>
</tr>

<!-- 수평선 -->
<tr>
  <td style="padding-left: 32px; padding-right: 32px;">
    <table width="100%" cellpadding="0" cellspacing="0" border="0">
      <tr>
        <td height="1" bgcolor="#e5e7eb"
            style="height: 1px; background-color: #e5e7eb; line-height: 1px;">
        </td>
      </tr>
    </table>
  </td>
</tr>

아웃라인(외곽선) 버튼

<!--[if mso]>
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml"
             xmlns:w="urn:schemas-microsoft-com:office:word"
             href="https://example.com"
             style="height: 44px; v-text-anchor: middle; width: 180px;"
             arcsize="5%"
             stroke="t"
             strokeweight="2px"
             strokecolor="#1a56db"
             fillcolor="#ffffff">
  <w:anchorlock/>
  <center style="color: #1a56db; font-family: Arial, sans-serif;
                 font-size: 14px; font-weight: bold;">
    더 알아보기
  </center>
</v:roundrect>
<![endif]-->
<!--[if !mso]><!-->
<a href="https://example.com"
   style="background-color: #ffffff;
          color: #1a56db;
          display: inline-block;
          padding-top: 12px; padding-bottom: 12px;
          padding-left: 24px; padding-right: 24px;
          text-decoration: none;
          border: 2px solid #1a56db;
          border-radius: 5px;
          font-family: Arial, sans-serif;
          font-size: 14px;
          font-weight: bold;">
  더 알아보기
</a>
<!--<![endif]-->

소셜 아이콘 행

<table cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td style="padding-right: 8px;">
      <a href="https://instagram.com/example" style="text-decoration: none;">
        <img src="https://cdn.example.com/icon-instagram.png"
             alt="Instagram" width="32" height="32"
             style="display: block; border: 0;">
      </a>
    </td>
    <td style="padding-right: 8px;">
      <a href="https://facebook.com/example" style="text-decoration: none;">
        <img src="https://cdn.example.com/icon-facebook.png"
             alt="Facebook" width="32" height="32"
             style="display: block; border: 0;">
      </a>
    </td>
    <td>
      <a href="https://youtube.com/example" style="text-decoration: none;">
        <img src="https://cdn.example.com/icon-youtube.png"
             alt="YouTube" width="32" height="32"
             style="display: block; border: 0;">
      </a>
    </td>
  </tr>
</table>