Need share buttons on your page? Check out this HTML-only solution!
Create stylish share buttons using just HTML and CSS
Share buttons play a crucial role in driving content engagement and increasing website traffic. However, many first-party share widgets come with drawbacks such as unsightly designs, the need for external JavaScript code, and potential privacy concerns due to third-party tracking cookies. Fortunately, there is a solution that allows you to create elegant share buttons using just HTML, without the need for any JavaScript code.
In an article titled “HTML Share Buttons,” published back in 2014 but still totally valid today, Gregory Schier (https://schier.co/) reveals how to create social share buttons using only HTML and some CSS, making them easily accessible, good-looking, and privacy-friendly. By leveraging the fact that email clients don’t execute JavaScript, the author demonstrates that a simple anchor tag is all you need to create functional and visually appealing share buttons.
The article provides example code snippets for popular social media platforms such as Twitter, Facebook, Reddit, Hacker News, LinkedIn, and Email. Each share button is represented by an anchor tag with a specific URL that includes the necessary query parameters for sharing relevant page meta-data like the URL…