Satish Satyarthi

  • Home
  • Blogging
  • Technology
  • Learn Korean
  • 힌디어 배우기

Connect with Me

  • Facebook
  • Google+
  • LinkedIn
  • Twitter

Powered by Genesis

Home » Blogging » Comment Out HTML Code in WordPress

Comment Out HTML Code in WordPress

April 9, 2019 By Satish Chandra Satyarthi 1 Comment

Wordpress HTML Comment OutCommenting out is making an HTML code inactive. When you comment out some lines of code on your page, those lines will be still there and you will be able to see them in the WordPress HTML editor but they will not appear in the browser. There may be several situations when you wight want to comment lines of HTML code in WordPress.

For example:

  • You want to put some additional information about a part of the HTML for future reference
  • You want to put a comment before a part of the HTML code so that you can search the comment and go to that part directly if you need to
  • You are testing some elements on the WordPress page or post and you don’t want to delete the code in case you need to revert back to it

In these situations commenting out option can come really handy.

The normal HTML comment out code is like this –

<!--   This is a comment in HTML -->

But sometimes it doesn’t work in WordPress. If that’s is the case try the following commenting out method:-

<!-- This is a comment in HTML <!-- -->

This will work in most of the situations.

Good Luck!

Filed Under: Blogging Tagged With: HTML, WordPress

About Satish Chandra Satyarthi

I am Satish - a professional blogger and language educator. You can connect with me on Facebook, Twitter or Google+

Comments

  1. Patrick Houlihan says

    May 3, 2017 at 1:24 AM

    The normal HTML comment code is working for me to comment out text. However, if the comment includes any HTML tags, it won’t work. I tried both of the solutions on this page. Any ideas on what I can try? Thanks!

    Reply

Please Leave your Comment Cancel reply

Subscribe to my blog

Get all new posts into your inbox!

My Courses on Udemy

Recent Posts

  • How to Setup Cloudflare Free SSL on a WordPress Site (2021)
  • Free Cloudflare CDN – Latest Setup for WordPress (2021)
  • Free Books and Online Courses You can Use during Lockdown
  • Increase the Maximum File Upload Size in WordPress
  • Should you master Grammar and Vocabulary before you start reading authentic text?
  • WordPress and Adsense Asynchronous Code – 2 Minute Guide

Top Posts & Pages

  • बाबा नागार्जुन का काव्य संसार - भाग २
  • बाबा नागार्जुन का काव्य संसार - भाग ३
  • कल्याण पत्रिका गीताप्रेस
  • Free Books and Online Courses You can Use during Lockdown
  • बाबा नागार्जुन का काव्य संसार - भाग १
  • बाबा नागार्जुन का काव्य संसार - भाग ५
  • गुरुजी, आपको नमन!
  • Solution - Hostgator WordPress Emails going to Spam
  • How to Setup Cloudflare Free SSL on a WordPress Site (2021)
Integrately - Integration platform
 

Loading Comments...