Just use a text frame and tag it as content.
Place both texts inside a tag each paragraph or block with their corresponding headline and body tags.
Tags on text should match or be assigned to paragraph (character) styles.
Thanks for the reply. Can you clarify a few things?
I create the content text frame and tag it as content.
I then create the headline text frame, outside of the content text frame, and tag it as headline.
I then drag / move the headline text frame on top of the context text frame.
I do the same with the body text frame.
It still exports the elements separately and not within the content tags.
I create the text frames using the 'T' icon in the side menu. Correct?
I can't create the headline text frame on top of the content text frame as it is expecting me to type text (shown by the cursor).
How do I place the texts inside a tag?
What does this mean: "Tags on text should match or be assigned to paragraph (character) styles."
Could not access to the Forum before.
What I see working is use just one text frame for both blocks of text.
That's a text frame where the first paragraph uses a tag of Headline
and all the other text is tagged as body.
Then tag the text frame as Content.
See the structure tree panel (Ctrl+Alt+1) where the it shows Root >Content>Headline, Body.
When exporting to XML you will get <Content> </Content> tags around both couples of tags for Headline and Body as you need.
If you wish to apply text styles to tagged text it is convenient you create a relationship, mapping, assigning those styles to tags.
Also if you wish to apply tags to text based on the text styles applied (Headline, Body,...) just assign tags to styles.
It's convenient to use same wording for both (take care of using Capitals)
How to apply and create the mapping?:
In the side menu of Tags panel you have commands for accessing to panels for those tasks: