I want to put my math notes on a Wordpress blog. I always write my notes using Pages and they always have the following format:

enter image description here

Is it possible to replicate the above format in a Wordpress post?

Unfortunately I don't know CSS or HTML. The only thing I could do in Wordpress was the following:

enter image description here

The most important thing for me is to delimit a theorem and its proof by a box. In addition, I would like the statement of the theorem to be highlighted in relation to its proof.

Thank you for your attention!


Below is the solution I found based on Valter Ekholm's answer:

<div style="border: 1.5px solid black; background-color:#f0f0f0">
   <b>THEOREM 1:</b> [...]

   <p style="background-color:#FFFFFF"> 


With the above code you get the following result:

enter image description here

  • I believe there are some 'Math Content' plugins available that are designed specifically to help format mathematical equations in blog posts. Try this: wordpress.org/plugins/wp-quicklatex More info here: wpbeginner.com/beginners-guide/… – Tony Djukic Feb 11 at 3:32
  • @TonyDjukic I have already learned how to write equations in Wordpress using Latex. The problem is that I don't know how to create those custom boxes. – rfloc Feb 11 at 6:12
  • So you just want to wrap the mathematical equations in custom looking boxes? That should just be a CSS solve but I'd need to see the actual output code that gets rendered to the page. You may also need to wrap the equations inside another 'container' so you can style it. – Tony Djukic Feb 11 at 21:04

In the page editor, switch to code-editor. Now your text will be within tags... probably a <p> tag.

Add css to the tag so it reads:

<p style="border: 1px solid gray"> ... </p>

Currently, to switch to code-editor, click the 3-dot-menu-button in the right top of the screen/window and then "Code Editor".

  • I cannot encompass more than two lines of text using this code. I even tried to put in the code <br> but I could not solve the problem. – rfloc Feb 13 at 21:09
  • I solved the problem. Just select the option "Custom HTML" and put this code there and the problem is solved! – rfloc Feb 13 at 21:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.