This tutorial is going to show you how to work with Google Chrome Web Inspector.
You may already know about FireBug, a Mozilla Firefox plugin. One of our video tutorials shows how to work with FireBug. In this guidance we are going to show you how to work with the similar tool in Google Chrome.
To open Google Chrome Web Inspector you can do the following:
From the Chrome menu:
Right click the element you want to inspect and select Inspect:
Using hot keys: Ctrl+Shift+I (or Cmd+Opt+I on Mac). Alternatively, you may press F12 on your keyboard.
This tool has several options available:
Editing CSS styles
Element tab allows you to edit CSS in live mode. It means that you may preview change you do in CSS on your site before making it on your site directly.
Here you can see what styles are assigned to certain elements of your site.
Open your Chrome developer tool using one of the methods described earlier.
On the right side of the panel you will see website CSS styles. You may edit CSS code here to see how they will be reflecting on your site.
Note! The changes made in developer tool won’t be saved. You can only see how your changes will affect your browser. To save the changes please edit the .HTML and .CSS files.
Inspecting the HTML markup
To access HTML code in your browser open your Google Chrome developer tool from your browser menu or using inspect elements tool.
On the left wide section you will see HTML code used on your page.
Once you select a certain element on your site you will see the corresponding HTML code highlighted in the browser. Alternatively, you can click on HTML elements directly in the Inspector, and it will highlight the element on the page.
Working with the Console
The Console helps to debug your webpage. To open the Console page:
Use CRTL+Shift+J hotkeys on Windows (or Cmd+Opt+J on Mac).
Or click Console button in already opened developers tool.
When Console is opened you will see all the errors that are on your site.
This tool is extremely useful if you have some issues with the site. Console will show you all the website errors and some clues on how to solve them.
You can also use the Net tab to see the causing errors files. The errors are marked with red.
To learn more about Google Chrome Console you can check default Google Chrome site.
Using Google Chrome Device Emulation feature
This feature will help you to test your responsive designs by emulating different screen sizes and resolutions.
To access this feature, make sure that your developer tool is opened. Click Toggle Device Toolbar button (or use CTRL+Shift+M hot-keys):
Once feature is enabled you can select mobile device you wish to check how your site looks like on certain resolution.
You can check our video tutorial on how to use Google Chrome Device Emulation feature for more details.
Feel free to check the detailed video tutorial below:
Also, take the time to review the selection of brand new html5 templates for websites.