Title: Prevent css to appear in source code
Last modified: September 19, 2022

---

# Prevent css to appear in source code

 *  [sovarone](https://wordpress.org/support/users/sovarone/)
 * (@sovarone)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/prevent-css-to-appear-in-source-code/)
 * Hello,
    When I create a website with WP, I usually insert my css in the Custom
   CSS field in Menu>Appearance>Customize>Additional CSS. I noticed that my custom
   classes are displayed in the source code of the web pages and I was wondering
   if there was a way to hide it from the source code. Many thanks for your help.
    -  This topic was modified 3 years, 8 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
      Reason: Moved to Fixing WordPress, this is not an Developing with WordPress
      topic

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [3 years, 8 months ago](https://wordpress.org/support/topic/prevent-css-to-appear-in-source-code/#post-16023880)
 * No. Why do you want to hide your CSS?
 *  Thread Starter [sovarone](https://wordpress.org/support/users/sovarone/)
 * (@sovarone)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/prevent-css-to-appear-in-source-code/#post-16023924)
 * Thanks for your reply. Because sometimes it represents a huge additional code.
   therefore a very long source code. If I would put it in a dedicated stylesheet
   linked to a child theme would it still appear?
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [3 years, 8 months ago](https://wordpress.org/support/topic/prevent-css-to-appear-in-source-code/#post-16023934)
 * There’s be a link to the style sheet, so it would be downloaded, so you’d get
   no net gain. Use a plugin like “autoptimize” to compress and combine all your
   CSS.
 *  Thread Starter [sovarone](https://wordpress.org/support/users/sovarone/)
 * (@sovarone)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/prevent-css-to-appear-in-source-code/#post-16023942)
 * Ok, I will try this. Thank you!!
 *  [calliko](https://wordpress.org/support/users/calliko/)
 * (@calliko)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/prevent-css-to-appear-in-source-code/#post-16024623)
 * So paste this code into your child theme’s style.css file.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Prevent css to appear in source code’ is closed to new replies.

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [hide](https://wordpress.org/support/topic-tag/hide/)
 * [source-code](https://wordpress.org/support/topic-tag/source-code/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 3 participants
 * Last reply from: [calliko](https://wordpress.org/support/users/calliko/)
 * Last activity: [3 years, 8 months ago](https://wordpress.org/support/topic/prevent-css-to-appear-in-source-code/#post-16024623)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
