HTML Text Formatting Tags Generator
Generate semantic HTML text formatting tags — strong, em, mark, code, kbd, del/ins, sup/sub, abbr, cite, q, blockquote, bdo and span — with only the attributes each tag supports, a live preview, and copy-ready HTML. Free, instant, no AI involved.
Input
Surrounding text wraps the tag in a <p>. Ignored for <blockquote>.
Settings
For <abbr>, put the full expansion here (e.g. HyperText Markup Language).
Used by <q>, <blockquote>, <del> and <ins>.
When the change was made. Used by <del> and <ins>.
<blockquote> only: wraps it in <figure> with a <figcaption>.
<bdo> only — it requires a direction.
Optional language code for text in another language.
Add custom CSS classes to the element. Separate multiple classes with spaces.
Output
Your element will appear here.
More ways to use this tool
REST API
curl -X POST https://api.iotools.cloud/v1/tool/html-generator/text-formatting \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "highlighted",
"element": "mark",
"textBefore": "This word is",
"textAfter": "in the sentence.",
"title": "",
"citeUrl": "",
"datetime": "",
"attribution": "",
"dir": "rtl",
"lang": "",
"customClasses": ""
}'Swap in your own key from your account. The tool's fields are the body — no wrapper.
Ask an AI agent
Use the IOTools `html-generator__text-formatting` tool (HTML Text Formatting Tags Generator) on this input:
YOUR_INPUT_HEREPaste this at any agent connected to the IOTools MCP server, then add your input.
Embed widget
<iframe
src="https://iotools.cloud/embed/html-generator/text-formatting/"
width="100%" height="520" frameborder="0" scrolling="no" loading="lazy"
title="HTML Text Formatting Tags Generator — iotools.cloud"
sandbox="allow-scripts allow-forms allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox"
allow="clipboard-write"
style="width:100%;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden"></iframe>
<script src="https://iotools.cloud/embed.js" async></script>Drop this into your own page — free, no key required, just a link back.
| Cost per API/MCP call | From 5 credits |
|---|---|
| Need more credits? | View pricing |
Also available with
Guides
HTML has a dedicated element for almost every kind of inline text meaning: <strong> for importance, <em> for stress, <mark> for highlights, <del> and <ins> for edits, <abbr> for abbreviations and more. This generator wraps your text in the right tag, adds only the attributes that tag actually supports, and shows a live preview.
Runs entirely in your browser: no AI call, no credits, no network round-trip. The output updates as you type.
How to use it
- Type the Text to format and choose an Element.
- Optionally add Text Before and Text After. The tag is then wrapped in a
<p>so the preview shows it inside a sentence. - Under Settings, fill in whatever applies to the chosen element:
- Title — a tooltip; for
<abbr>, the full expansion. - Source URL — the
citeattribute for<q>,<blockquote>,<del>and<ins>. - Date / Time — when a
<del>or<ins>edit was made. - Quote Attribution — wraps a
<blockquote>in<figure>with a<figcaption>. - Text Direction — required by
<bdo>. - Language and CSS Classes — work on every element.
- Title — a tooltip; for
- Copy or download the HTML.
Attributes that don't apply to the chosen element are left out, so the output is always valid.
Which tag should I use?
| Element | Meaning | Default look |
|---|---|---|
<strong> |
Strong importance, a warning | Bold |
<em> |
Stress that changes the meaning of a sentence | Italic |
<mark> |
Text highlighted for relevance, e.g. a search match | Yellow background |
<code> / <kbd> |
Code fragment / keys the user presses | Monospace |
<s> |
No longer accurate (an old price) | Strikethrough |
<del> / <ins> |
Text removed from / added to a document | Strikethrough / underline |
<sup> / <sub> |
Superscript / subscript (x², H₂O) | Raised / lowered |
<small> |
Side comments, fine print | Smaller |
<abbr> |
Abbreviation, with its expansion in title |
Dotted underline |
<cite> |
Title of a creative work | Italic |
<q> / <blockquote> |
Inline / block quotation | Quote marks / indented |
<bdo> |
Forces a text direction | Reversed for rtl |
<span> |
No meaning; a styling hook | None |
Isn't <b> the same as <strong>?
They look the same, but <strong> tells screen readers and search engines the text is important. Use <b> and <i> only for purely stylistic offsets with no extra meaning.
<s> or <del>?
Use <s> for content that is no longer relevant but stays on the page, like a crossed-out price. Use <del> for a real edit to the document, ideally with a datetime.
For a link, try the HTML Hyperlink Generator. To write longer formatted content, the Markdown to HTML converter produces the same tags from Markdown syntax.
Privacy
Everything runs in your browser. Nothing you type is sent to a server.