Java Servlet Programming Question:

When using servlets to build the HTML, you build a DOCTYPE line, why do you do that?

Tweet Share WhatsApp

Answer:

I know all major browsers ignore it even though the HTML 3.2 and 4.0 specifications require it. But building a DOCTYPE line tells HTML validators which version of HTML you are using so they know which specification to check your document against. These validators are valuable debugging services, helping you catch HTML syntax errors.

Download Java Servlet Programming PDF Read All 26 Java Servlet Programming Questions
Previous QuestionNext Question
What is filter? Can filter be used as request or response?What is new in ServletRequest interface?(Servlet 2.4)