How to change contribution pages profile labels into a placeholder?
You write a small jQuery script and include it on your forms

&lt;script type="text/javascript"&gt;
CRM.$(function($) {
  let label, labelDiv, value;
  $('input').each(function() {
    value = $(this).val();
    labelDiv = $(this).closest('.crm-section').find('.label');
    $(labelDiv).hide();
    label = $(labelDiv).text();
    label = label.replace(/\s\s+/g, ' ');
    $(this).attr("placeholder", label);
  });
});
&lt;/script&gt;


There are various ways to include jquery in your forms


Implement hook(buildform or preprocess or pagerun) via extension/plugin/module to add js using add resource method
Override tpl file using extra.tpl method to include jquery