Chrome Developer Tools help tremendously with front-end development (HTML, CSS & JavaScript) and are also useful for running and debugging JavaScript code.
Participants will be able to
- Open the Source Code Viewer
- Use the Quick Source Viewer Chrome Extension
- Access the "Elements" tab within the Developer Tools pane
- Access the JavaScript console within the Developer Tools pane
- Why Chrome Developer Tools are an important part of a web developer's workflow
- How to view a webpage's source code with and without Quick Source Viewer
- How to access the "Elements" tab to view a webpage's HTML and CSS
- How to access the JavaScript console to run and debug code
- Various keyboard shortcuts to open Chrome Developer Tools
- Chrome Developer Tools (video walkthrough of slides)
- Chrome Developer Tools (slides)
- Debug JavaScript - Read on, or watch the video version
- "Websites are so mysterious! I can't find out how they're made." Hopefully this lesson has shown you how to find the code behind your favorite websites!
- "All the source code I'll see using Chrome Dev Tools is good-quality code." Most of the code you'll see will be good-quality code if you're looking at the website of a reputable or well-known company. There are exceptions, however.
- "I can just copy and paste whatever code I find using Chrome Dev Tools." You should always 1) Understand the code you want to use before you put it into your own project, and 2) Give proper credit to the company or person who wrote the code.
-
Navigate to one of your favorite websites.
-
Open the source code using the Quick Source Viewer Chrome Extension.
-
Open the Developer Tools pane and navigate to the "Elements" tab.
3a. Activate the mouseover tool and hover over different elements of the webpage. What parts of the HTML & CSS code become highlighted when you mouseover certain parts of the webpage?
3b. Deactivate the mouseover tool. Click on the mobile tool and view the webpage on a variety of screen sizes. Is the webpage responsive (elements change size and layout based on screen size) or not?
-
Open the JavaScript console. What do you see?
-
List the keyboard shortcuts that you can use to access webpage HTML elements, the Source Code Viewer, and the JavaScript console, respectively.
-
When would it be helpful to use the JavaScript console (as opposed to the Source Code Viewer)?
-
What are some advantages of using the Quick Source Viewer extension (as compared to the Source Code Viewer)?