5

I'm trying to move to HTML5 on new projects, that don't require high cross-browser-ism. However, I can't find a way to add the HTML5 tags, such as header or aside, to "normal" tags within other html-tags, so they would be highlighted. Un-colored code really slows development down, so I have to stick with xhtml until this issue gets resolved.

I'm using Notepad++, so it would be great to fix this issue in it specifically. If that's out of range, I'd like to hear any other similar (light, compact) text-editor, which supports HTML5 better.

1 Answer 1

5

One way I can think of is to modify %ProgramFiles%\Notepad++\langs.xml, but I don't know if that is going to get overwritten when you upgrade Notepad++. You'll want to back up that file regardless, just in case.

Find this chunk (simply searching for <Language name="html" will do):

        <Language name="html" ext="html htm shtml shtm xhtml" commentLine="" commentStart="&lt;!--" commentEnd="--&gt;">
            <Keywords name="instre1">...</Keywords>
        </Language>

Inside the <Keywords> element, add the HTML5 element names space-separated, making sure you don't type over the existing names inside, of course.

You may have to have elevated privileges in order to save the file, but when you save it and restart Notepad++, it'll recognize your added names as HTML identifiers.

Sign up to request clarification or add additional context in comments.

1 Comment

Someone has apparently already taken the time to do the above for html5 tags and css3 properties: sourceforge.net/tracker/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.