Spread the love

What is Doctype in web testing?

Spread the love

What is Doctype in web testing?
What is Doctype in web testing?Add caption

While testing a web ,we generally ignore the the page deceleration part also.No interviewer asks about doc type of web page to test engineers and developer!!!!!.More over while developing a web application this part is untold.
True ….we generally ignore this very important part.

Doctype Testing

From the very beginning of the internet,web rather the HTML has changed a lot. It is really an old language having lot more wrapper on it. When these wrappers are applied on web pages, It became impossible to track. On the other HTML parser of a browser became puzzled what kind of HTML content is there, which is going to be displayed.
With advancement of technology the electronic devices like-pad,tablet,mobile etc are able to browse the internet. A browser may/may not purse some HTML command which is not proper but these devices are not.
So the web became machine/browser dependent to display it’s content correctly.

Hence W3school came with some proper standard for each version upgrade of HTML.
How it is looking like–

<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01//EN”
and in HTML-5
<!doctype html>
where it is upfront telling the browser/device that this page talks about a html type whose version is 4.01.
and it is taking a public standard,Its markup language is English(EN). It is also giving the address of the standard file where all the standard resides. Doc type the browser is able to be more precise in the way it interprets and renders your pages. Using a doc type is highly recommended but not mandate.

READ  Top 22 Types of Testing a Test Engineer Should Know
READ  How I solved code review process

But I strongly advice that there should be some test cases to cover  these part. And i strongly suggest that this doc type should be there.

What will be a test engineers responsibility  if a page does not have a doc type?

Well, If this is not documented in Requirement specification ,Test engineers need to have a discussion with the module /application owner regarding the same. Make them understand what could be the problem if a page does not have a doc type.
These points may help you during discussion-
1.In general a browser internally call HTML 4 quick mode if it does not have a doc type. As a result, this can show your content but fails when cross browser testing happening.
2.Internet capable devices may  not show the page content correctly.
3.HTML validator tool can not perform a code check activity on the page.
4. The style sheet may not support.
5. If doc type is not declared the browser will render the page as quick doc type mode(by default) ,which may not satisfy all your beautiful code.
No user/customer can avoid this point.

How to Test HTML-5 Webpages?

HTML-5  have come up with lot more modifications on the deceleration portion. It is really nice for the developer and test engineer.
But we need to test for


  • Remember the HTML-4 and less will have …syntax like <link type=”text/css” rel=”stylesheet” href=”abc.css”> but in HTML 5 <link rel=”stylesheet” href=”lounge.css”>
  • HTML 4 will have -<script src=”lounge.js”></script> but HTML-5 will have only <Script></Script>
  • Meta tag in HTML 4 or less is  <meta http-equiv=”content-type” content=”text/html; charset=UTF-8″> but in HTML-5<meta charset=“utf-8″>
  • There is an existence of XHTML in HTML 4 or less but HTML 5 does not have that.
READ  11 Reasons to Go for HTML 5

Spread the love
Animesh Chatterjeehttps://techtravelhub.com/
I am the founder and owner of the blog - TechTravelHub.com, always love to share knowledge on test automation,tools,techniques and tips.I am a passionate coder of Java and VBScript.I also publish articles on Travel ideas and great honeymoon destinations.Apart from these, I am a gear-head,love to drive across India. I have shared lots of articles here on How to travel several parts of India.Customization of cars aka car modification is my another hobby.Get in touch with me on ani01104@gamil.com

Related Articles

Learn What Primary Tools For Test Automation

Primary Tools For Test Automation According to the Gartner report Magic Quadrant...



Please enter your comment!
Please enter your name here

Recent Posts

Super Keyword in Java Simplified

Super Keyword Super Keyword in Java Simplified: Java defines a special...

Learn Object Repository in UFT in An Efficient and Fast Manner

Object Repository in UFT The post will cover the following...

Learn What Primary Tools For Test Automation

Primary Tools For Test Automation According to the Gartner report...


Spread the love