The code to implement this custom script on HTML elements is as below: The code is devided in two parts: i)head, ii)body section.