This attribute will replace the entire tag with a value, or by nothing if no value is given.

<span tal:replace="string:this beautiful string">
  this ugly string and span

Will produce:

this beautiful string

tal:replace can also be used to create samples in source templates, but remove them from final output.

  <tr tal:repeat="item myresult">
    <td tal:content="item">item value</td>
  <tr tal:replace="">
    <td>sample 1</td>
  <tr tal:replace="">
    <td>sample 2</td>