Have you failed a job interview?
Send us your job interview questions and get correct answers.
How can you display HTML code of a web application?
Experience Level: Junior
There are couple of options how to do this:
Option 1: View page source
Most of the browsers allow you to display the web page source. Try the shortcut Ctrl+U or right-click the web page and click View page source.
Option 2: Use Developer Tools
Most of the browsers have integrated Developer Tools. Try to press F12, click Inspect Element, select the element to be inspected by clicking on the element. The HTML code of element is displayed in Developer Tools together with the rest of the HTML page.
Option 3: Use proxy server to intercept the HTTP request/response
You can always intercept the data of the web page using Fiddler or similar tool. Once you reload the page, the proxy server will intercept the response returned by the server and you can then analyze the response together with the HTML code it contains.
Related HTML job interview questions
What is a basic structure of the HTML page?HTML Junior
What is the difference between html Element and Attribute?HTML Junior
What is HTML used for?HTML Junior