Finding code with inspect element

When your using “inspect the element” to find code is there a way to fine out where that code ( html ) is held. It tells you the name of the css files and line for css but how do you tell what files the html is in?

Many thanks

Hi, hantaah, The HTML is in the file that you are inspecting and possibly right under your cursor. :slight_smile:

Hi

I’m not inspecting it in the actual file, I’m inspecting it from the firebug inspect element. In the css area it tell your what file that css is in but it doesn’t for the html

Yes, but don’t you have to have a particular HMTL file open in order to inspect its CSS? I’m probably misunderstanding because you are doing something I’ve never thought of. :slight_smile:

of course but I want to edit the html and want to know what file it is in to edit it, not just edit it in inspect element

There’s where I’m getting lost… if you have an html file open, how do you not know what file it’s in? UNLESS, maybe the HTML is assembled from php calls and you would like to know which php file a portion is in. Is that what you’re talking about? Sorry to be dense.

i’m seeing the html in firebug ( firefox ) by right clicking the web page and inspecting the element. It shows you the html, I don’t have any file open, all done from the browser

Hantaah,

I’m not sure there is a specific option in firebug that will say “this html file is located in this folder on your server”. I could be wrong but I don’t think it will show this info. The URL of the page should give you a clue. Usually it won’t show the absolute path to the HTML document but it could give you an idea where to start looking.

I’m not sure what you are using to upload files to your website but if you are familiar with an FTP program like Filezilla, you can use it to search your server for an HTML file.

Here is a tutorial on how to do that,

http://www.addictivetips.com/windows-tips/how-to-use-remote-file-search-in-filezilla-325/

Best,

Shawn

HI, As others have alluded to you if you are inspecting an element on a live page then you must have already navigated to that page and therefore its whereabouts must be known to you (although of course the page may be built with includes or php so you won’t know where all fragments came from).

When you inspect an element then you get the css for that element and you can also see the html in that current page that the css refers to. It won’t tell you where on your server that page is located but in most cases that would be pretty obvious from the url for most simple sites.

You may need to explain a little more about the problems you are having and maybe we can suggest something else.:slight_smile: