Module:UtilsHTML/doc

From Eco - English Wiki
Revision as of 16:43, 22 February 2022 by Demian (talk | contribs) (Add category.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is the documentation page for Module:UtilsHTML

This module provides utility functions that generate HTML code. They are used to shorten and make code in other modules more readable by providing functions to generate frequently used pieces of HTML code such as an abbr-tag or a unit of measure text like "ppm" (with an abbreviation tag that shows the name of the unit).

Usage[edit source]

Add the following line of code at the top of your file.

local HTMLUtils = require("Module:UtilsHTML")

-- You may then call functions from this module in your script. For example:
local unitKM = HTMLUtils.tagAbbr("km", "kilometers")