There are several ways you can add custom CSS to a WordPress post or page.

Custom HTML block

Insert a “Custom HTML” block into the post/page and use the HTML style tag.

Pros

  • works on any post or page
  • if a user can edit a post or page, they can add the custom css

Cons

  • need to manually add the block to every single post/page
  • if the CSS needs to be changed, it has to be changed on every post/page

Code Snippet Plugin

There are many code snippet plugins for WordPress. Most of them allow the user to break up the CSS into small chunks that can be edited outside the post/page. The user can then assign the CSS snippets into the desired pages.

Pros

  • editing the CSS code in the snippet will apply to all posts/pages that have added the snippet

Cons

  • the user needs to install a plugin which the user may not have the permission to
  • another plugin to install means more things for WordPress to load

WordPress Theme

WordPress themes allow users to add additional CSS to the theme via the theme’s “Customize” section. This will apply to all posts/pages that contain the elements the CSS effects.

Pros

  • one place to edit the custom CSS

Cons

  • user may not have permission to edit the theme
  • user may not want the CSS to apply to all pages/posts that contain the CSS elements