search

Home  >  Q&A  >  body text

After adding <span> tag, the text disappears

<p>I am a newbie in learning Html to design email templates. I need to add text in front of the symbol and make sure the text stays aligned on the next line. I'm using the <li> tag to properly align the text after the symbol. But for some reason it doesn't seem to work. </p> <p>After adding the <li> tag, the text does not display, it disappears. If I remove <li>, the text reappears. I'm not sure what the cause of this behavior is. Any help is greatly appreciated. Thanks in advance. </p> <pre class="brush:php;toolbar:false;"><!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="stylesheet" href="style.css" /> <title>Browser</title> </head> <div class="b opaf v" style=font-size:0;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%> <table cellpadding=0 style=border:none;vertical-align:top width=100%> <tr> <td align=left class=x style=font-size:0;word-break:break-word> <div style=text-align:left> <p style=margin:0;text-align:left><span style=font-size:12px;font-family:Arial,sans-serif;font-weight:400;color:#54565b;line-height :14px><span style=color:inherit;font-weight:inherit;font-family:inherit;font-size:65%;vertical-align:4px;line-height:0>&sect;</ span> ; </span> </p> </div> </td> </tr> </table> </div> <script src="script.js"></script> </body> </html></pre>
P粉226642568P粉226642568477 days ago575

reply all(1)I'll reply

  • P粉949848849

    P粉9498488492023-08-14 17:08:38

    I think some basic HTML structure is not followed. I believe this is the desired output.

    <!DOCTYPE html>
    <html lang="en">
    
    <head>
      <meta charset="UTF-8" />
      <meta name="viewport" content="width=device-width, initial-scale=1.0" />
      <link rel="stylesheet" href="style.css" />
      <title>Browser</title>
    </head>
    
    <body>
      <div class="b opaf v" style="font-size: 0; text-align: left; direction: ltr; display: inline-block; vertical-align: top; width: 100%;">
        <table cellpadding="0" style="border: none; vertical-align: top; width: 100%;">
          <tr>
            <td align="left" class="x" style="font-size: 0; word-break: break-all;">
              <div style="text-align: left;">
                <ul style="margin: 0; padding-left: 20px; list-style-type: "&sect;;">
                  <li style="font-size: 12px; font-family: Arial, sans-serif; font-weight: 400; color: #54565b; line-height: 14px; position: relative;">
                    <span style="color: inherit; font-weight: inherit; font-family: inherit; font-size: 65%; vertical-align: 4px; line-height: 0;">&sect;</span>
                    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
                  </li>
                </ul>
              </div>
            </td>
          </tr>
        </table>
      </div>
      <script src="script.js"></script>
    </body>
    
    </html>

    reply
    0
  • Cancelreply