type Attributes = { /** lang attribute @example ``` html({ lang: 'en' }); ``` */ lang?: string, /** id attribute @example ``` div({ id: "main-content" }); ``` */ id?: string, /** class attribute @example ``` div({ class: "main home-page" }); ``` */ class?: string, /** style attribute @example ``` div({ style: "background: blue; color: red;" }); ``` */ style?: string, /** onclick attribute @example ``` button({ onclick: "import('/js/some-script.js').default(_ => _.default())" }); ``` */ onclick?: string, /** onchange attribute @example ``` input({ type: "text", onchange: "import('/js/some-script.js').default(_ => _.default(this.value))" }); ``` */ onchange?: string, /** onload attribute @example ``` img({ src: "/images/image.jpg", alt: "Image description", onload: "import('/js/some-script.js').default(_ => _.default())" }); ``` */ onload?: string, /** onerror attribute @example ``` img({ src: "/images/image.jpg", alt: "Image description", onerror: "import('/js/some-script.js').default(_ => _.default())" }); ``` */ onerror?: string, /** onscroll attribute @example ``` body({ onscroll: "import('/js/some-script.js').default(_ => _.default())" }); ``` */ onscroll?: string, /** src attribute @example ``` script({ src: "/js/script.js", }); ``` */ src?: string, /** srcset attribute @example ``` img({ srcset: "elva-fairy-480w.jpg 480w, elva-fairy-800w.jpg 800w", sizes: "(max-width: 600px) 480px, 800px", src: "elva-fairy-800w.jpg", alt: "Elva dressed as a fairy" }); ``` */ srcset?: string, /** sizes attribute @example ``` img({ srcset: "elva-fairy-480w.jpg 480w, elva-fairy-800w.jpg 800w", sizes: "(max-width: 600px) 480px, 800px", src: "elva-fairy-800w.jpg", alt: "Elva dressed as a fairy" }); ``` */ sizes?: string, /** href attribute @example ``` a({ href: "/path/to/page", target: "_blank" }, "Link to page"); ``` */ href?: string, /** target attribute @example ``` a({ href: "/path/to/page", target: "_blank" }, "Link to page"); ``` */ target?: string, /** content attribute @example ``` meta({ name: "description", content: "This is a description" }); ``` */ content?: string, /** name attribute @example ``` input({ type: "text", name: "username" for: "username" }); ``` */ name?: string, /** type attribute @example ``` input({ type: "text", name: "username" for: "username" }); ``` */ type?: string, /** for attribute @example ``` input({ type: "text", name: "username" for: "username" }); ``` */ for?: string, /** alt attribute @example ``` img({ src: "/images/image.jpg", loading: "lazy", alt: "Image description", }); ``` */ alt?: string, /** loading attribute @example ``` img({ src: "/images/image.jpg", loading: "lazy", alt: "Image description", }); ``` */ loading?: string, /** rel attribute @example ``` link({ rel: "stylesheet", href: "/css/styles.css" }); ``` */ rel?: string, /** width attribute @example ``` canvas({ width: "200", height: "100" }); ``` */ width?: string, /** height attribute @example ``` canvas({ width: "200", height: "100" }); ``` */ height?: string, /** charset attribute @example ``` meta({ charset: "UTF-8" }); ``` */ charset?: string, /** disabled attribute @example ``` button({ type: "submit", disabled: true }); ``` */ disabled?: boolean, /** checked attribute @example ``` input({ type: "checkbox", checked: true }); ``` */ checked?: boolean, /** crossorigin attribute @example ``` script({ src: "/js/script.js", crossorigin: "anonymous" async: "true" }); ``` */ crossorigin?: string, /** async attribute @example ``` script({ src: "/js/script.js", crossorigin: "anonymous" async: true }); ``` */ async?: boolean, /** defer attribute @example ``` script({ src: "/js/script.js", crossorigin: "anonymous" defer: true }); ``` */ defer?: boolean, /** value attribute @example ``` input({ type: "text", value: "Enter your name" }); ``` */ value?: string, /** as attribute @example ``` link({ rel: "preload", as: "image", href: "/images/image.jpg" }); ``` */ as?: string, /** placeholder attribute @example ``` input({ type: "text", placeholder: "Enter your name" }); ``` */ placeholder?: string, /** span attribute @example ``` col({ span: "2" }); ``` */ span?: string, [key: string]: string | boolean | undefined }; /** `` element. @example ``` img({ src: "/images/image.jpg", alt: "Image description" }); ``` @returns {string} Returns a string. ``` Image description ``` */ export function img(args?:Attributes): string; /** `` element. @example ``` area({ href: "/right", shape: "circle", coords: "290,172,200", alt: "Right" }) ``` @returns {string} Returns a string. ``` Right ``` */ export function area(args?:Attributes): string; /** `` element. @example ``` base({ href="https://www.example.com/" }); ``` @returns {string} Returns a string. ``` ``` */ export function base(args?:Attributes): string; /** `
` element. @example ``` br(); ``` @returns {string} Returns a string. ```
``` */ export function br(args?:Attributes): string; /** `` element. @example ``` col({ span: "2" }); ``` @returns {string} Returns a string. ``` ``` */ export function col(args?:Attributes): string; /** `` element. @example ``` embed({ src: "/images/video.mp4", type: "video/mp4" }); ``` @returns {string} Returns a string. ``` ``` */ export function embed(args?:Attributes): string; /** `
` element. @example ``` hr(); ``` @returns {string} Returns a string. ```
``` */ export function hr(args?:Attributes): string; /** `` element. @example ``` input({ type: "text", name: "username" for: "username" }); ``` @returns {string} Returns a string. ``` ``` */ export function input(args?:Attributes): string; /** `` element. @example ``` link({ rel: "stylesheet", href: "/css/styles.css" }); ``` @returns {string} Returns a string. ``` ``` */ export function link(args?:Attributes): string; /** `` element. @example ``` meta({ charset: "UTF-8" }); meta({ name: "description", content: "This is a description" }); meta({ property: "og:title", content: "about page | example.com" }) ``` @returns {string} Returns a string. ``` ``` */ export function meta(args?:Attributes): string; /** `` element. @example ``` param({ name: "autoplay", value: "true" }); ``` @returns {string} Returns a string. ``` ``` */ export function param(args?:Attributes): string; /** `` element. @example ``` source({ src: "/images/video.mp4", type: "video/mp4" }); ``` @returns {string} Returns a string. ``` ``` */ export function source(args?:Attributes): string; /** `` element. @example ``` track({ src: "/images/video.mp4", kind: "captions", srclang: "en", label: "English" }); ``` @returns {string} Returns a string. ``` ``` */ export function track(args?:Attributes): string; /** `` element. @example ``` wbr(); ``` @returns {string} Returns a string. ``` ``` */ export function wbr(args?:Attributes): string; /** `` element. @example ``` a({ href: "/path/to/page", target: "_blank" }, "Link to page"); ``` @returns {string} Returns a string. ``` Link to page ``` */ export function a(args?:Attributes|string): string; /** `` element. @example ``` abbr({ title: "Hypertext Markup Language" }, "HTML"); ``` @returns {string} Returns a string. ``` HTML ``` */ export function abbr(args?:Attributes|string): string; /** `
` element. @example ``` address({ class: "contact" }, "123 Main Street"); ``` @returns {string} Returns a string. ```
123 Main Street
``` */ export function address(args?:Attributes|string): string; /** `
` element. @example ``` article({ class: "post" }, "This is a post"); ``` @returns {string} Returns a string. ```
This is a post
``` */ export function article(args?:Attributes|string): string; /** `