How to Get Html Code from a Website
- The internet browsers are used to view the source HTML code of the webpage.
- The source code of a web page is resultant HTML code of the server side code. Client user cannot view the server code.
Google Chrome in Windows / Mac
These are the steps to get HTML code from a website in Google Chrome Browser.
- Use Keyboard shortcut Ctrl+U in windows or Option + Command + U in MAC to view page source.
(OR)
- Right click the blank part of the web page then chose view page source on the context menu.
![](img/get-code-from-a-website/chrome-right-click.png)
![](img/get-code-from-a-website/chrome-source.png)
Firefox in Windows / Mac
These are the steps to get HTML code from a website in Firefox.
- Use Keyboard shortcut Ctrl+U in windows or Option + Command + U in MAC to view page source.
(OR)
- Right click the blank part of the web page then chose view page source on the context menu.
![](img/get-code-from-a-website/firefox-right-click.png)
(OR)
- In Firefox Menu chose Tools -> Web Developer -> Page Source.
![](img/get-code-from-a-website/firefox-menu-source.png)
![](img/get-code-from-a-website/firefox-pagesource.png)
Edge or Internet Explorer
These are the steps to get HTML code from a website in Edge or Internet Explorer Browser.
- Use Keyboard shortcut Ctrl+U to view page source
(OR)
- Right click the blank part of the web page then chose view page source on the context menu.
![](img/get-code-from-a-website/edge-right-click.png)
![](img/get-code-from-a-website/edge-output.png)