Why do I add HTML annotation characters inside the style tag in CSS __html

Source: Internet
Author: User
Why do I want to add HTML annotation inside the style tag in CSS

I finally figured it out today.

Why add <!---->html annotation characters inside CSS style tags

Ashamed to say, the development has a little time, often look at the style tag contains this HTML annotation symbol, want to understand the reason, really did not find, the internet did not find the reason, may be their own way to find the wrong bar.

Let's move on to the next step.

Why do you want to add this annotation character?

In fact, in style with the <!----> because some of the lower version of the browser does not recognize the style tag, will be the contents of the style text directly to the page, in order to avoid this situation, it is best to add an annotation character, do not let it show.

Not only the high and low browser version of the problem, different browsers, the interpretation of the standard is not the same when the browser can recognize the style tag,<!----> the label will filter out, continue to execute the core style code;
When the browser does not recognize the style tag, the,<!----> works, which is the annotation function. is to block out the content, not to show it.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.