Can not type php tags in html file

Hi, I'm new in phpstorm. I'm doing my first website. I have some .HTML in my project, and I want to add some php code on it, but... Phpstorm do not recognice the php tags in the html file.
Also I have the same problem on WebStorm...
What I'm doing wrong??
Thanks for the help.


Hi, try to rename .html file to .php (or .html.php) - easiest option. Alternatively go to File | Settings | Editor | File Types, find PHP and add full html filename (e.g. index.html) to the list of registered patterns under PHP.


It works!!

Thanks a lot!!


Thanks for the short and clear answer for this simple setting 👍👍👍


Please sign in to leave a comment.