0

Hi!
Sory for my bad english.

Is it posible to make in php a html compiler (program that will check if there is lexical or semantic mistakes)?
(eg. If someone write: "<html><haed>", the program will check and write message that is error in code and that must be writen "<html><head>").
Thanks!

Edited by ivan3510: mistake

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by ivan3510
0

It's possible, although there are many already out there. If you just need one to use, google "HTML syntax checker".

If you really wanted to make one yourself, it would be a fairly extensive project. In the simplest form, you'd have to assemble a list of every HTML tag, and make your own parser(using regular expressions) to check for any bad tags.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.