Skip to content
View Categories

HTML CSS inline – cheat sheet

With inline CSS, you style individual elements directly in the HTML of a stage, bucket, or email. You write the style in the attribute. style. For designs you use frequently, it's worth creating a custom class in the global CSS; see [link/reference]. CSS selectors.

text #

<p style="color: #3C8DBC; font-size: 18px;">Blue text in 18 px</p>
<p style="font-weight: bold;">Bold text</p>
<p style="text-align: center;">Centered text</p>
<span style="background-color: yellow;">Marked in yellow</span>

Spacing, frames and background #

<div style="padding: 16px; margin-bottom: 20px;            background: #f5f5f5; border: 1px solid #ddd;            border-radius: 8px;">
  A grey box with a frame and rounded corners
</div>

Pictures #

<img src="https://example.com/bild.jpg" alt="Beschreibung"
     style="width: 100%; max-width: 400px; border-radius: 8px;">

Links and buttons #

<a href="https://example.com" target="_blank"
   style="color: green; text-decoration: none;">Green Link</a>

<a href="https://example.com"
   style="display: inline-block; padding: 10px 20px;          background: #3C8DBC; color: #fff; border-radius: 4px;">
  About the program
</a>

Listen #

  • Point 1
  • Point 2

Arrange them side by side #

<div style="display: flex; gap: 16px;">
  <div style="flex: 1;">Left column</div>
  <div style="flex: 1;">Right column</div>
</div>

Alternatively, you can use the Bootstrap classes. row and col-md-6, which are available in all stages.

Good to know #

  • You separate multiple properties with a semicolon.
  • You should use inline CSS in emails because many email programs <style>-Blocks are not reliably supported.
  • You can find a complete overview of all CSS properties at SELFHTML.

Related: CSS selectors, Create a stage, Create an admin dashboard

en_US