Zum Inhalt springen

Style information for HTML tags for newsletters

When creating an HTML newsletter in TYPO3 with css_styled_content, inline styles must be used for headings, paragraphs or links. This is the only way to define the correct output in the various e-mail clients.

Some helpful adjustments in the Typoscript:

## Headers
lib.stdheader.10 {
  1.dataWrap = <h1 style="padding:0; margin:0px 10px 10px 10px; font-family: Arial, Helvetica, sans-serif; font-size:25px; line-height:33px; color:#333333;">|</h1>
  2.dataWrap = <h2 style="padding:0; margin:0px 10px 10px 10px; font-family: Arial, Helvetica, sans-serif; font-size:18px; line-height:24px; color:#333333;">|</h2>
  3.dataWrap = <h3 style="padding:0; margin:10px; font-family: Arial, Helvetica, sans-serif; font-size:13px; line-height:17px; color:#333333;">|</h3>
  4.dataWrap = <h4 style="padding:0; margin:10px; font-family: Arial, Helvetica, sans-serif; font-size:13px; line-height:17px; color:#333333;">|</h4>  
} 
## add style to p
tt_content.text.20.parseFunc.nonTypoTagStdWrap.encapsLines.addAttributes.P.style = font-family:Arial, Helvetica, sans-serif;color: #666B6E; font-size: 13px; 
## add a tag style
lib.parseFunc_RTE.tags.link.typolink.ATagParams = style="color: #12BAE2; text-decoration:0; font-weight: bold;"

If a heading is entered in the RTE text field, it must also have a style specification:

tt_content.text.20.parseFunc.nonTypoTagStdWrap.encapsLines.addAttributes.H2.style = padding:0; margin:0px 10px 10px 10px; font-family: Arial, Helvetica, sans-serif; font-size:25px; line-height:33px; color:#333333;

This page contains automatically translated content.

Updated: 09.04.2025