What is a Bookmarklet?
Creating a Bookmarklet
Creating a bookmarklet is simple. Follow these steps to create one:
- Open your favorite web browser and create a new bookmark (you can use the keyboard shortcut Ctrl + D or Cmd + D on macOS).
Copy and paste the above code into your bookmark’s URL field.
Examples of Bookmarklets
Now that you know how to create a bookmarklet, let’s explore some examples of useful bookmarklets:
1. Change Background Color
This bookmarklet will change the background color of the webpage to a color of your choice:
2. Display Page Title and URL
This bookmarklet will display the title and URL of the current webpage in an alert box:
3. Highlight All Links
This bookmarklet will highlight all the links on the webpage with a yellow background: