You should implement best practices like maintaining the code separate from the content. I suggest…