5 HTML Snippets you didn't know

Ajelolu Olayinka
2 min readFeb 5, 2023

--

An HTML snippet is a small portion of source code in HTML. We use it in building various elements like list views, different styled buttons, text displays, customized search bars, and so on.

Snippets are helpful when you do not want to build a web page from scratch. These snippets of code assist with speeding up your development process by giving you tested strategies to get the outcomes you’re looking for.

HTML snippets include up to 140 HTML tags, depending on whether you check the Mozilla Developer Network or HTML.com.

Here are five uncommon HTML snippets.

Tooltip

In HTML, Tooltip shows extra information about a selected element. You can do this with the mouse hover-effect whenever you move the mouse over an element that uses a tooltip to display specified information about itself. to add a tooltip all you need to do is add title= tooltip to your HTML element.

tooltip snipet

Content editable

The HTML content-editable attribute can be set as true or false, depending on whether the content can be modified.

ccontent editable

Marquee type

Non-standard HTML element marquee tag makes text/image scroll in any direction automatically.

maquee

Download

The download attribute allows you to download the file specified in the href attribute when you click on the hyperlink.

When you download the file, the optional value of the download attribute becomes the file’s new name.

<hgroup>: Multi-level heading

This tag regroups multiple headings in a document (<h1>-<h6>). This way, none of the secondary children in this group will create individual sections .

--

--

Ajelolu Olayinka

Front end developer || React Js developer || Ux designer