How can you inspect HTML code of a specific element in a web page?
Experience Level: Junior
Tags: Quality Assurance (QA)
Answer
There are slight differences between browsers so we will describe how this can be done in Google Chrome. There are three ways:
- Right click the element in the page and click Inspect
- Open Chrome DevTools using F12, click the arrow icon that is in the top left corner of DevTools, select an element in the page by clicking on it
- Display the page source code, locate the element by the text that is contained within it or some of its siblings (this solution is quite slow and clumsy)
Related Quality Assurance (QA) job interview questions
What is a Development environment (DEV)?
Quality Assurance (QA) JuniorWhat is a Local environment?
Quality Assurance (QA) JuniorWhat is Network in Chrome DevTools good for?
Quality Assurance (QA) JuniorWhat is Console in Chrome DevTools good for?
Quality Assurance (QA) JuniorHow to turn on Chrome DevTools?
Quality Assurance (QA) Junior