Viewing Pages with Web Contents
With PyCharm, you can perform two opposite operations:
- Preview the output of your Web application in the browser to check whether the pages are rendered correctly. PyCharm can display a page preview in a browser of your choice or you can switch between several browsers. PyCharm currently supports previews in the following browsers:
- View the HTML source code of a Web page in the PyCharm editor.
Previewing pages with web content in a browser
Preview a file in a Web browser
To preview an opened file in a Web browser, do one of the following:
- On the main menu, choose . The current file opens in the default browser.
- With the editor tab having the focus, choose on the main menu or press Alt+F2. Then select the desired browser from the pop-up menu:
- Hover your mouse pointer over the code to show the browser icons bar, and click the icon that indicates the desired browser:
Opening Web page in the editor
To open the HTML source code of a Web page in the editor
You can open the HTML source code of any Web page in the PyCharm editor.
No matter which programming language was originally used to develop a page (for example, XML or PHP), PyCharm shows the resulting HTML code.