Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Usage  





2 Notable cases  





3 See also  














Template:HTML comment






Latina
 

Edit links
 









Template
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 

(Redirected from Template:Html comment)

  • {{murmur}}
  • Use this substitution to insert HTML comments (<!-- ... -->) – hidden to readers – into Wikipedia pages.

    Usage[edit]

    {{subst:html comment|Lorem ipsum dolor sit amet}}
    <!-- Lorem ipsum dolor sit amet -->

    By default a space will be added before and after the given text. Use |collapsed=yes to remove it (useful in vertical comments). For example,

    {{subst:html comment|collapsed=yes|
    
    Lorem ipsum dolor sit amet
    
    }}
    

    will generate

    <!--
     
     
    Lorem ipsum dolor sit amet
     
     
    -->
    

    In substitutable templates, use {{{{{|safesubst:}}}HTML comment|...}}.

    Notable cases[edit]

    Using this substitution allows the expansion of MediaWiki commands inside HTML comments, where they would be preserved verbatim otherwise. Compare:

    {{subst:html comment|{{subst:FULLPAGENAME}}}}
    <!-- Template:HTML comment -->

    and:

    <!-- {{subst:FULLPAGENAME}} -->
    <!-- {{subst:FULLPAGENAME}} -->

    See also[edit]


    Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:HTML_comment&oldid=1169581957"

    Categories: 
    HTML typing-aid templates
    Wikitext typing-aid templates
    Wikipedia metatemplates
    Hidden category: 
    Wikipedia substituted templates
     



    This page was last edited on 10 August 2023, at 00:37 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki