Skip to content

Instantly share code, notes, and snippets.

@pizofreude
Last active April 16, 2025 18:22
Show Gist options
  • Save pizofreude/85a78b40ccdb719ed8a9bff74a2aacf9 to your computer and use it in GitHub Desktop.
Save pizofreude/85a78b40ccdb719ed8a9bff74a2aacf9 to your computer and use it in GitHub Desktop.
Methods to center a clickable hyperlink in Markdown.

How to Center a Clickable Hyperlink in Markdown

Method 1

One way to center a clickable hyperlink in HTML is to use the tag inside a

tag with “text-align:center” style1.

For example:


<p style="text-align: center;">
  <a href="https://www.bing.com">This is a centered clickable link</a>
</p>

Method 2

Another way is to use a list of links and style them with “text-align:center” and "display:inline-block"2.

For example:


<ul style="list-style-type:none;">
  <li style="text-align:center; display:inline-block;">
    <a href="https://www.bing.com">This is a centered clickable link</a>
  </li>
</ul>

Method 3 (Works best for GitHub)

This one worked and tested in GitHub README.md:

<p align="center">
<a href="https://github.com/Pizofreude/github-profile-views-counter">
    <img src="https://komarev.com/ghpvc/?username=Pizofreude">
</a>
</p>
@pizofreude
Copy link
Author

pizofreude commented Apr 16, 2025

Toggle list

<details> </details>

Usage Example 1

  • Dimension modelling for better understanding the dataset
    Click to view the entity–relationship diagram (powered by dbdiagram.io)

Usage Example 2

We summarize how the components in the data pipeline are set up and where you can find these configurations in this repo.

drawing

Usage Example 3



Free Falasteen image
This will resize the image to 30% of the available width and height.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment