Is there a way to make Safari open a dark blank page?

There may be other ways to do this, but a simple way would be to create your own homepage, which could look anyway you like. Then, just set the Homepage in Safari to point at that file.

Make a file called "home.html" with these contents:

<!DOCTYPE html>
<html style="background:#333;">
<head>
    <title>New Tab</title>
</head>
</html>

Open that file with Safari, and use the preferences dialog to set the homepage to the current page. Also set new tabs and windows to start on your homepage.


Extending on the answer provided earlier, you can make a simple html file, and save it in your home directory or somewhere, and then set up your General Safari preferences like this:

Then when Safari starts up, or you open a new tab it'll be the nice darker empty page:


The previous solutions for the blank dark page do not auto-focus on the address bar, one solution is to set a custom safari stylesheet and change body color to dark.

Create darkblanksafari.css as below:

@media screen,projection,tv { 
       body {
       background-color: #1c1c1c;
       }
}

Now set Style Sheet to the file through Advanced tab in Safari Preferences: enter image description here

It leads to less eye strain and less glaring white pages in your late nights while keeping your internet experience intact, because most websites replace body background color with their own.


The previously noted solutions of the dark page is great, but they lack the ability to have the address bar auto-focused, which to me is a non-starter. I'm used to being able to immediately start typing a URL or a search item right off the bat when I open a new page / tab. This is such a good feature that I went ahead and submitted a request for Apple to add this feature, but I think in the meantime there may be a clunky workaround.

While I did not find any blank page html or css floating around the Safari.app bundle unfortunately, I realized that we could use a macro app like SimpleKeys, Keyboard Maestro, or another such app to create a double whammy where we could set the default blank page as noted previously, ie:

Edit ~/Library/Safari/DarkBlank.html (and set your blank page to this):

<!DOCTYPE html>
<html style="background:#333;">
<head>
    <title>New Tab</title>
</head>
</html>

And then set a macro to initiate a (command-t,command-l) or (command-n,command-l) in order to create a new tab or window with the address bar in focus. You'd have to get used to a new shortcut to do this, but you'd get the expected behavior.

At any rate, I hope that there is ultimately a better solution put in place by Apple themselves, but if you want address bar focus, this is probably the best we can hope for at the moment unless someone is aware of another way to hack the page (perhaps via NinjaKit or EasySIMBL).


This is not a direct solution to creating a dark page open for a new tab. However, I have similar issues with working late and straining my eyes to read glaring white pages. I personally use Flux and it solves the issue for me system-wide.

https://justgetflux.com/

The default settings are a bit extreme for me, but you can edit them to your preferences and set a schedule for when you'd like it turned on. Took almost 2-3 weeks for me to get used to it but now I'm hooked. Hope it helps.