user603007
user603007

Reputation: 11794

chrome: difference page source and inspect element?

what is the difference between the html in 'view page source' and inspect element in Chrome 15? looks like 2 different html?

Upvotes: 5

Views: 5628

Answers (4)

vien tran
vien tran

Reputation: 1

E.g.: for a little different

  1. html page source
This is a plaintext <br />
  1. inspect element
This is a plaintext <br>

Upvotes: 0

geoffreak
geoffreak

Reputation: 2328

The view page source page shows you the exact text that was returned by the server. Inspect element actually shows you the fully rendered DOM tree.

The DOM tree is slightly different for each browser, depending on the specific quirks and support of features.

Upvotes: 14

Salman Aslam
Salman Aslam

Reputation: 781

I guess code modified/added by JavaScript will be available in Developer tool inspect element. And code at time of page load can be seen by view source.

Upvotes: 2

switz
switz

Reputation: 25188

View page source opens the file in a separate window, whereas inspect element allows you to modify (locally of course) the code and change css values while the page live-updates.

Upvotes: 0

Related Questions