Create HTML page to document contents of directory
(Warning I havn't tested the following code.)

Python


Offload the custom html to a template engine. Jinja2 can be used in both flask and django. And so I'll change your code to use this. (I'm not affiliated)
It's good to see you manually .closeing your files. But using with is better.
Use ' or " string delimiter. You can switch if the string contains your prefered one. I prefer ', but would use "it's" rather than 'it\'s'.
You can move your CSS into its own file and copy the file with whatever you think is best.
I'd use ''.join and a comprehension to make filenames a string, that can be passed to Jinja.




#! /usr/bin/python3
from os import walk
from pathlib import Path
import shutil

from jinja import Environment, FileSystemLoader, select_autoescape

FILE = Path(__file__).resolve()
RESOURCES = FILE / 'name'
CWD = Path.cwd()

env = Environment(
    loader=FileSystemLoader(str(RESOURCES / 'templates')),
    autoescape=select_autoescape(['html'])
)

if __name__ == '__main__':
    shutil.copyfileobj(
        open(RESOURCES / 'css' / 'style.css'),
        open(CWD / 'style.css', 'w+')
    )

    filenames = ''.join(
        '{{ "name":"{0}", "desc":"{0}" }},'.format(f.name)
        for f in CWD.iterdir()
        if f.is_file()
    )

    with open(CWD / 'index.html', 'w+') as html:
        page = env.get_template('index.html').render(
            title='Documents',
            links=filenames
        )
        print(page, file=html)


CSS

From the little I've done with CSS your file looks a bit off to me:


I'm used to seeing a line between each style.
I'm used to seeing K&amp;R, rather than Allman, indentation style.
You should keep your indentation consistant.
I'm used to seing a space after : and ,.


New location: /bin/name/css/style.css.

body { 
    font-style: normal;
    font-family: sans-serif, Georgia, Helvetica, Arial, sans-serif;
    background-color: white;
    color: black;
    margin-left: 5%;
}

div.navbar {
    text-align:center;
}


HTML

I'm used to seing indentation, most webdev tools also do this for you. And so I'd assume that if they're doing it then there's a good reason for it. I find your HTML code to be a bit hard to read currently because of it.

New location: /bin/name/templates/index.html.

&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;{{ title }}&lt;/title&gt;
  &lt;link rel="stylesheet" href="style.css"&gt;
  &lt;script&gt;
    var links = [{{ links }}];

    function loadLinks() {
      var table = document.getElementById("docTable");
      links.reverse();
      links.forEach(function(element, index, array) { 
        var row = table.insertRow(0);
        var cell1 = row.insertCell(0);
        var cell2 = row.insertCell(1);
        cell1.innerHTML = "&lt;a href=\\"" + element.name + "\\"&gt;" + element.name + "&lt;/a&gt;";
        cell2.innerHTML = element.desc;
      });
    }
  &lt;/script&gt;
&lt;/head&gt;
&lt;body onload="loadLinks()"&gt;
  &lt;h1&gt;Documents&lt;/h1&gt;
  &lt;p&gt;
    These directories may contain &lt;b&gt;proprietary and confidential&lt;/b&gt; information.
  &lt;/p&gt;

  &lt;p&gt;
  &lt;table id="docTable"&gt;
    &lt;caption&gt;Document list&lt;/caption&gt;
  &lt;/table&gt;
  &lt;p&gt;&amp;nbsp;&lt;/p&gt;
  &lt;table&gt;
    &lt;tr&gt;
      &lt;td&gt;
        &lt;a href="index.html"&gt;index.html&lt;/a&gt;
      &lt;/td&gt;
      &lt;td&gt;
        this file
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;