I have a linked table of contents in the README for a repository on GitHub, but would also like to have a "return to TOC" link at every title through the rest of the README as it's quite long to scroll through and not all sections are important depending on what the reader wants to look at. To not visually distract from each section title, I'm hoping to be able to have the TOC link on the far right of the same row as the section title.

I have tried the html solution suggested in this post (How may I align text to the left and text to the right in the same line?), but it was not successful. I am not very well versed in html, so have included my current title line without the TOC link below, then provided the modified code that did not work - it's possible I simply made a syntax error?

Current example title line:

## <p style="color:#CC6600">3. Data Cleaning & Filtering:</p> 

Modified example title line that failed (all text remained left-aligned):

## <p style="color:#CC6600"><p style="text-align:left;">3. Data Cleaning & Filtering: <span style="float:right;">[TOC](#table-of-contents)</span></p> 
1

There are 1 best solutions below

2
On

Unfortunately you cannot use inline styles in Github's markdown. Github removes all inline styles in its markdown.