Read about hooking actions and filters in the Plugin API. The technique is fundamental to customizing anything in WordPress. Once you hook into the filters I mentioned previously, your callback function is passed the comment field HTML. Use PHP string manipulation to insert something like placeholder="my label"
into the input tags. A typical comment field should end up looking like something like this when you’re done: <input id="author" name="author" type="text" value="" size="30" placeholder="my label" />
. Then return the modified HTML data.
When developing string manipulation code I usually var_dump the value passed to my callback. I then copy it into a simple PHP test page where I can easily develop the correct code to do what’s needed without the distraction of all the other WordPress stuff. Once the code is working right, I can insert it into my filter callback function with confidence that it will work correctly.
Even though the article is about plugin development, you can place code that hooks into WordPress in your theme’s or better yet your child theme’s functions.php file. Or you might consider starting a “catch all” plugin that contains all of your future little customizing code.