---
title: "HTML säubern und verschiedene Content Elemente"
url: "https://www.typo3.net/d/102944-html-saeubern-und-verschiedene-content-elemente"
source: "typo3.net"
tags: ["TYPO3","TypoScript","Frage","HTML & CSS","Inhaltselemente"]
created: "2010-12-16"
last_reply: "2010-12-16"
replies: 0
solved: false
page: 1
pages: 1
lang: "de"
---

# HTML säubern und verschiedene Content Elemente

TYPO3 › TypoScript · 0 Antworten · gestartet 2010-12-16

## Eröffnungsbeitrag

**leibnitz** · 2010-12-16 · [Beitrag #1](https://www.typo3.net/d/102944-html-saeubern-und-verschiedene-content-elemente/1)

Hallo,

steh mal wieder vor einer Aufgabe bzgl. Typo3.

**1. HTML Code säubern und formatieren**

Ich möchte gerne die HTML ausgabe anders formatieren, weiß allerdings nicht wie genau.

Ziel soll folgender Code werden:

```html
<div class="intro">
<h2>Überschrift</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus id dui mauris. Nulla ipsum augue.</p>
</div>
```

der aktuelle Code der derzeit rauskommt ist folgender:

```html
<div class="csc-default" id="c1">
<div class="csc-header csc-header-n1">
<h3 class="csc-firstHeader">Überschrift</h3>
</div><p class="bodytext">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus id dui mauris. Nulla ipsum augue.</p>
</div>
```

mit folgendem TypoScript hab ich schon mal das hier erreicht:

```html
<div class="csc-default" id="c1">
<h3>Überschrift</h3>
<p class="bodytext">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus id dui mauris. Nulla ipsum augue.</p>
</div>
```

```typoscript
plugin.tx_cssstyledcontent._CSS_DEFAULT_STYLE >

# // Prefix-Kommentare ausschalten
config.disablePrefixComment = 1
lib.stdheader.5.prefixComment >
lib.stdheader.stdWrap.prefixComment >
tt_content.stdWrap.prefixComment >
tt_content.header.20.prefixComment >
tt_content.text.20.prefixComment >
tt_content.image.20.stdWrap.prefixComment >
tt_content.bullets.20.stdWrap.prefixComment >
tt_content.table.20.stdWrap.prefixComment >
tt_content.uploads.20.stdWrap.prefixComment >
tt_content.multimedia.20.stdWrap.prefixComment >
tt_content.mailform.20.stdWrap.prefixComment >
tt_content.search.20.stdWrap.prefixComment >
tt_content.search.30.stdWrap.prefixComment >
tt_content.login.20.stdWrap.prefixComment >
tt_content.splash.20.stdWrap.prefixComment >
tt_content.menu.20.stdWrap.prefixComment >
tt_content.shortcut.20.stdWrap.prefixComment >
tt_content.list.20.stdWrap.prefixComment > 
tt_content.script.prefixComment >
tt_content.div.prefixComment >
tt_content.html.prefixComment >
tt_content.default.prefixComment >

# // Vorangestellten Anker bei Inhaltselementen entfernen
# tt_content.stdWrap.dataWrap >
# tt_content.header.20.dataWrap >

# // Zusätzliche CSS-Klassen bei Standardüberschriften entfernen
lib.stdheader.3 = LOAD_REGISTER
lib.stdheader.3.headerClass =
lib.stdheader.3.headerClass.noTrimWrap = |
lib.stdheader.stdWrap.dataWrap >

# // Einfache <hx>-Tags ohne Style-Deklarationen verwenden
lib.stdheader.10.1.fontTag = <h1>|</h1>
lib.stdheader.10.2.fontTag = <h2>|</h2>
lib.stdheader.10.3.fontTag = <h3>|</h3>
lib.stdheader.10.4.fontTag = <h4>|</h4>
lib.stdheader.10.5.fontTag = <h5>|</h5>
```

wie schaff ich es das der HTML Code so generiert wird, wie in meinem Beispiel?

**2. verschiedene Elemente unterschiedlich formatieren**

Ich habe mehrere class´s festgelegt, eine class heißt z.b. **intro**, die andere **outro**

Wie kann ich es machen, dass ich wenn ich ein Contentelement z.B. Text anlege, dann die jeweile Class verwendet wird?

2. hängt ja auch zusätzlich mit 1. zusammen.

Kann mir jemand helfen?

Mfg Leibnitz

---

Quelle: „HTML säubern und verschiedene Content Elemente“, typo3.net, https://www.typo3.net/d/102944-html-saeubern-und-verschiedene-content-elemente
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
