Forem Creators and Builders 🌱

Benjamin Bilgehan
Benjamin Bilgehan

Posted on

how to embed HTML with CSS style on a post page.

<a href="#" class="myButton">green</a>

.myButton {
    background-color:#44c767;
    border-radius:28px;
    border:1px solid #18ab29;
    display:inline-block;
    cursor:pointer;
    color:#ffffff;
    font-family:Arial;
    font-size:17px;
    padding:16px 31px;
    text-decoration:none;
    text-shadow:0px 1px 0px #2f6627;
}
.myButton:hover {
    background-color:#5cbf2a;
}
.myButton:active {
    position:relative;
    top:1px;
}
Enter fullscreen mode Exit fullscreen mode

or

<h1 style="color:blue;">This is a header</h1>

Enter fullscreen mode Exit fullscreen mode

i would like to add this code on a post page ? does anybody know how ?

Top comments (2)

Collapse
 
ioscasey profile image
Casey 💎 • Edited

Hey Benjamin! Great question, our markdown only accepts certain html tags and any styling applied to said tags is cleaned up:

allowed_tags = 
%w[strong abbr aside em p h1 h2 h3 h4 h5 h6 i u b code pre
br ul ol li small sup sub img a span hr blockquote kbd]
Enter fullscreen mode Exit fullscreen mode

A great alternative to this would be to embedd a CodePen or JSFiddle - you can find info about our editor here

Collapse
 
benjaminb profile image
Benjamin Bilgehan

Thank you for the reply. I hope forem developers will add this feature in the near future.