Toolvito

Works on this device

HTML Element Generator

Choose what you want to make and type the values. The page writes clean HTML code that you can copy into your own page. Every character you type is made safe, and nothing is sent to a server.

Choose and type the values

Bold, italic, highlighted, raised or lowered text, a heading, a paragraph, or text with a colour and a size.

A new line in the text becomes a line break. An empty line starts a new paragraph.

Optional. A hex colour, rgb(), hsl() or a colour name.

Optional.

Optional.

More options

A browser shows several spaces in a row as one. With this, the extra spaces are written as   (a space that does not break).

Optional. Names for your own CSS, with a space between two names.

Optional. A name that is used only once in the page.

Your values are worked out in this browser. They are not sent to a server.

Your HTML will show here

Type the values, or choose Try an example.

How to use the generator

  1. Choose what you want to make: text with a tag, a link, an image, a button, a list, a form, or moving text.
  2. Type the values, or choose Try an example to see how it works. The code shows as you type.
  3. Open More options for a class name, an id and the less common settings.
  4. Choose Copy text or Download file, and put the code into your page.

What each choice makes

  • Text with a tag: a paragraph, a heading, a quote or a pre block, with a tag inside it such as strong (bold), em (italic), mark (highlight), sup, sub, code or abbr. Colour, size, alignment and font are written as a style attribute.
  • Link: an a element to a web page or file, an email address, a phone number, a place in the same page, or a WhatsApp chat. It can open in a new tab.
  • Image: an img element with alt text, width and height, and if you want lazy loading, a caption (figure), a link around it, or a second file format (picture).
  • Button: a button element of the type button, submit or reset, or a link to a page.
  • List: a bullet list, a numbered list with sub-items, a list of terms with their descriptions, or a drop-down list with its label.
  • Form: fields with their labels. Text, email, password, phone, number, date, text area, drop-down list, radio buttons, tick box and file. Required fields, the shortest text and the autocomplete value are written as attributes.
  • Moving or blinking text: HTML and CSS that do what the old marquee and blink tags did, with a way to stop the movement.

Worked examples

  • Bold text: the text Order by Friday with the block Paragraph and the tag Important, shown bold gives <p><strong>Order by Friday</strong></p>.
  • Link: the address www.example.com/prices, the words See our prices and Open in a new tab give <a href="https://www.example.com/prices" target="_blank" rel="noopener noreferrer">See our prices</a>. The page adds https://, because without it a browser would look for a file of your own site.
  • Image: the address https://www.example.com/img/tulips.jpg, the alt text Red tulips in a garden, width 800 and height 600 give <img src="https://www.example.com/img/tulips.jpg" alt="Red tulips in a garden" width="800" height="600" style="max-width: 100%; height: auto">.
  • Special characters: the text Fish & chips < 5 euros becomes Fish &amp; chips &lt; 5 euros, so a browser shows the text as you typed it.

Blink and marquee today

The blink tag is not part of HTML, and current browsers show its text without blinking. The marquee tag is marked in the HTML Standard as a tag that pages must not use any more, even though many browsers still move its text.

This page makes the two effects with CSS. Moving text gets a tick box that pauses it, because text that moves for more than five seconds must have a way to stop it. Blinking text blinks at most a few times, never more than three times in a second, and then stays on. Both stand still for people who ask their device for less motion.

Good habits that the page follows

  • Every picture gets alt text, or an empty alt="" when you say that it is only decoration.
  • Every form field gets a label that is tied to it. A group of radio buttons gets a fieldset with a legend.
  • A link that opens a new tab gets rel="noopener noreferrer".
  • A button always gets its type, and what goes to another page is written as a link, not as a button.
  • The old tags font and center are not written. Their work is done by a style attribute.

Limits you should know

  • The page writes code. It does not show a picture of the result, and it does not load your image or open your link. Test the code in your own page.
  • An address may start with https:// or http://, or be an address inside your own site. Addresses that start with javascript: or data: are refused.
  • The form is HTML only. The browser does the simple checks, but the program that gets the form must check every value again. This page does not make that program and no script.
  • One element at a time. For a styled button, a navigation bar, a card or an image slider with its CSS, use the UI Component Generator. For a table, use the HTML Table Generator.
  • Meta tags for search engines and social cards, and links with campaign (UTM) values, are not made here.
  • Audio, video and embedded frames are not made here.

Related tools