Skip to content

Using the Chrome Inspect Element Tool to examine HTML and CSS for a page

Once you have your development environment set up, and a child theme ready to be filled in, there’s one more handy tool you’ll want to understand before you start making changes to your site. Google’s Chrome Inspect Element feature has become a beloved tool by developers because it allows you to see the code behind any given feature of your site from the front end. If you’re using a theme you didn’t hand code yourself, you’ll need to figure out what classes and ids correspond to which parts of your site before you can start making changes. Here’s how to use  Chrome Inspect Element to quickly get the information you need to start designing your site.

Here’s a video explaining:

Here’s it written out:

  1. Download Chrome (if you don’t have it already).
  2. Type in the URL of the page you’ll be making changes to. (In this case, I’m assuming  you’ve already activated the theme you want to use and hopefully have some filler content).
  3. Highlight and right-click the area of your site that you want to see the code for. In this case, I’ll be looking at the author bio that pops up under new posts.inspect-element-tutorial-1
  4. Select “Inspect Element” from the context menu that pops up when you right-click.
  5. A new area within your browser will pop up with the line of HTML highlighted that corresponds with the area you selected, and the corresponding CSS available below.inspect-element-tutorial-2
  6. By looking at the CSS, you can tell which element in your stylesheet is controlling the design elements. In this case, .author-content p is the class for that specific area, though most of the styling is inherited from the paragraph element p.

You can do this for any element of your site, and write and adjust code until everything looks pixel perfect! For more information about Chrome’s developer tools, check out Google’s document site or some great tutorials on YouTube. (Also know: though this guide is specific to how Chrome’s works, most other browsers have a similar feature!)

Yay! 🎉 You made it to the end of the article!
David Hayes

Inline Feedbacks
View all comments

Or start the conversation in our Facebook group for WordPress professionals. Find answers, share tips, and get help from other WordPress experts. Join now (it’s free)!

Would love your thoughts, please comment.x

Most Searched Articles

Best JavaScript Libraries and Frameworks: Try These 14 in 2024

In this post, we look at the best JavaScript libraries and frameworks to try out this year. Why? Well, with JavaScript being available in every web browser, this makes it the most accessible programming language of ...

20 Best Free WordPress Themes for 2024 (Responsive, Mobile-Ready, Beautiful)

If you're looking for only the best free WordPress themes in the market for this year, then you're in the right place. We have more than enough such themes for you right ...

12 Best WordPress Hosting Providers of 2024 Compared and Tested

Looking for the best WordPress hosting that you can actually afford? We did the testing for you. Here are 10+ best hosts on the market ...

Handpicked Articles

How to Make a WordPress Website: Ultimate Guide for All Users – Beginners, Intermediate, Advanced

Many people wonder how to make a WordPress website. They’ve heard about WordPress, its incredible popularity, excellent features and designs, and now they want to join the pack and build a WordPress website of their own. So, where does one get ...

How to Start an Ecommerce Business: Ultimate Guide for 2024

Is this going to be the year you learn how to start an eCommerce business from scratch? You’re certainly in the right place! This guide will give you a roadmap to getting from 0 to a fully functional eCommerce business. ...