Having tested in incognito mode in Chrome, everything seems to work fine. This is likely caused by some kind of extension.
Solution 1 :
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:
The same content loaded from a web server in Chrome:
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:
<html>
<head>
<title>test1</title>
</head>
<body>
<div>
<p><strong><span>TEST1</span></strong></p>
<p><strong>Test2</strong></p>
<p>testparagraph.</p>
</div>
</body></html>
Comments
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 imgur.com/a/WB9yVtc
Comment posted by naimdjon
Thanks @Quentin for checking out. In incognito mode it works fine, likely caused by some extension or plugin.