If you really want to have HTML scope for a string literal you can use a heredoc with 'HTML' as the terminator: <?php echo <<<HTML <p>This is html</p> HTML; ?> this will give you HTML highlighting and commands etc for the length of the heredoc. It also works for 'SQL'. You can check what the current scope is at any time with control-shift-P