ENH: added an optional css id to <table> tags created by to_html()
State: closed

This is useful for the reasons mentioned in [#8496](https://github.com/pandas-dev/pandas/issues/8496) 
- [x] closes #8496
- [x] tests added / passed: `test_to_html_with_id`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:

Comments:
Hello @samghelms! Thanks for updating the PR.

 - In the file [`pandas/core/frame.py`](https://github.com/pandas-dev/pandas/blob/ced26f9e544f6306bb56b5571310779631092b0b/pandas/core/frame.py), following are the PEP8 issues :

> [Line 1763:76](https://github.com/pandas-dev/pandas/blob/ced26f9e544f6306bb56b5571310779631092b0b/pandas/core/frame.py#L1763): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace

 - In the file [`pandas/io/formats/format.py`](https://github.com/pandas-dev/pandas/blob/ced26f9e544f6306bb56b5571310779631092b0b/pandas/io/formats/format.py), following are the PEP8 issues :

> [Line 750:47](https://github.com/pandas-dev/pandas/blob/ced26f9e544f6306bb56b5571310779631092b0b/pandas/io/formats/format.py#L750): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 750:49](https://github.com/pandas-dev/pandas/blob/ced26f9e544f6306bb56b5571310779631092b0b/pandas/io/formats/format.py#L750): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals

 - In the file [`pandas/tests/io/formats/test_format.py`](https://github.com/pandas-dev/pandas/blob/ced26f9e544f6306bb56b5571310779631092b0b/pandas/tests/io/formats/test_format.py), following are the PEP8 issues :

> [Line 1494:18](https://github.com/pandas-dev/pandas/blob/ced26f9e544f6306bb56b5571310779631092b0b/pandas/tests/io/formats/test_format.py#L1494): [E211](https://duckduckgo.com/?q=pep8%20E211) whitespace before '('

 - In the file [`pandas/tests/io/formats/test_to_html.py`](https://github.com/pandas-dev/pandas/blob/ced26f9e544f6306bb56b5571310779631092b0b/pandas/tests/io/formats/test_to_html.py), following are the PEP8 issues :

> [Line 1874:1](https://github.com/pandas-dev/pandas/blob/ced26f9e544f6306bb56b5571310779631092b0b/pandas/tests/io/formats/test_to_html.py#L1874): [W391](https://duckduckgo.com/?q=pep8%20W391) blank line at end of file


# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19591?src=pr&el=h1) Report
> Merging [#19591](https://codecov.io/gh/pandas-dev/pandas/pull/19591?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/36f905285c0089228985cffc9f9f6c7d28789128?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/19591/graphs/tree.svg?token=eZ4WkYLtcO&src=pr&width=650&height=150)](https://codecov.io/gh/pandas-dev/pandas/pull/19591?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #19591      +/-   ##
==========================================
+ Coverage   91.62%   91.62%   +<.01%     
==========================================
  Files         150      150              
  Lines       48780    48785       +5     
==========================================
+ Hits        44693    44698       +5     
  Misses       4087     4087
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.99% <100%> (ø)` | :arrow_up: |
| #single | `41.73% <33.33%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/19591?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/19591/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.42% <100%> (ø)` | :arrow_up: |
| [pandas/io/formats/format.py](https://codecov.io/gh/pandas-dev/pandas/pull/19591/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvZm9ybWF0LnB5) | `96.25% <100%> (ø)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19591?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19591?src=pr&el=footer). Last update [36f9052...ced26f9](https://codecov.io/gh/pandas-dev/pandas/pull/19591?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).