Community
    • Login

    How to make CSS code in Html header have color coding syntax highlighting?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 7.4k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Pete NorrisP Offline
      Pete Norris
      last edited by

      Hello Notepad++ Forum;

      Question: How can I get the style code enclosed within the <style> tags in the header of an Html document to have color coded syntax highlighting?

      All of the style code enclosed withing the <style> tags in the header of an Html document is black/bold.

      But the css style code in an external Style.css file has got nice color syntax highlighting.

      <html>
      <body>
      <header>
      <style type=“text/css”>
      Everything in between style tags is black/bold.
      How can I get the style code here to be color coded syntax highlighting?
      </style>
      </header>

      1 Reply Last reply Reply Quote 0
      • gerdb42G Offline
        gerdb42
        last edited by

        NP++ is only able to apply one styler at a time to a document. The styler to use is selected by file extension so in your case since your file is .html the HTML-styler is chosen. However, you may switch the styler from the menu: Language->C->CSS will activate the CSS-styler with the drawback that the HTML-Part will be poorly styled then.

        Long story short: you may switch between stylers, but you won’t be able to apply both at the same time.

        1 Reply Last reply Reply Quote 0
        • Pete NorrisP Offline
          Pete Norris
          last edited by

          gerdb42;

          Thanks for responding to my question. I appreciate the information.

          PN

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors