Solution 1 :

Having tested in incognito mode in Chrome, everything seems to work fine. This is likely caused by some kind of extension.

Problem :

Is there any special css automatically added when an html file is loaded from local filesystem? The exact html is displayed slightly differently when loaded dynamically from a webserver. See the screenshots:

From a local file stored in a local disk and opened in Chrome:

enter image description here

The same content loaded from a web server in Chrome:

enter image description here

I am trying to get the html displayed as in the local file, i.e. with margins and paddings. I know that I can add css style, but I’m curious to know why these two are displayed differently.

Using this html:




Comment posted by tmdesigned

When you say from a local file, do you mean you are clicking the file? Or a local server? If just loading the file, I would suspect what you seeing is a different interpretation of line breaks by your OS vs a server OS you might otherwise use.

Comment posted by naimdjon

Stored a file in a local disk and opened the file in Chrome.

Comment posted by Dave Ankin

lots of behavior is different when using the

Comment posted by

Comment posted by naimdjon

Thanks @Quentin for checking out. In incognito mode it works fine, likely caused by some extension or plugin.