Add html ID to content field When I create the content (specific to the content, not to the content type), I want to type in an optional ID, that would be set on the html element.

Is there a module for this?
In Drupal 6, you can theme cck fields by copying content-field.tpl.php from the CCK module's includes directory to your theme directory and then creating a content-field-FIELDNAME.tpl.php to customize the look of that individual field.  Or, if you want to wrap every field with a uniquely id'ed div, you could edit your copy of content-field.tpl.php and add:

&lt;div id="&lt;?php print $field_name_css . '-' . $node-&gt;nid; ?&gt;"&gt;

-- php code between the check if the field isn't empty --

&lt;/div&gt;


to the template, or around whatever portion in it you needed.  Just be careful with multiple field items, their ids would need a -$delta added to them if you put this inside the code of the template instead of wrapping it entirely, or adding the id= to the first div, etc.  If you want to id it with a user supplied field, you can grab that from the $node given, eg

$node-&gt;field_my_optional_id[0]['value']


but you have to sanitize it.

Now, I know you said Drupal 7, and I am sure it's subtly different there, but this should put you on the right path.  Hope it helps!

UPDATE/EDIT:  It's field.tpl.php from the system module field's theme directory in D7.