How can you display HTML code of a web application?

Experience Level: Junior
Tags: HTML

Answer

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
HTML for beginners
HTML for beginners

Are you learning HTML? Try our test we designed to help you progress faster.

Test yourself