evancz/elm-html/3.0.0

NOTE: this package moved to elm/html

NOTE: this package is not compatible with Elm 0.19.1

Html

This file is organized roughly in order of popularity. The tags which you'd expect to use frequently will be closer to the top.

Custom Nodes

node : String -> List Attribute -> List Html -> Html

General way to create HTML nodes. It is used to define all of the helper functions in this library.

div : List Attribute -> List Html -> Html
div attributes children =
    node "div" attributes children

You can use this to create custom nodes if you need to create something that is not covered by the helper functions in this library.

text : String -> Html

Just put plain text in the DOM. It will escape the string so that it appears exactly as you specify.

  text "Hello World!"

Conversions

toElement : Int -> Int -> Html -> Element

Embed HTML in Elements. Useful if your app is written primarily with Elements, but you need to switch over to HTML for some small section.

fromElement : Element -> Html

Embed Elements in HTML. Useful if you have some component written with Elements or that uses collage that you want to embed in a larger HTML component.

Headers

h1 : List Attribute -> List Html -> Html
h2 : List Attribute -> List Html -> Html
h3 : List Attribute -> List Html -> Html
h4 : List Attribute -> List Html -> Html
h5 : List Attribute -> List Html -> Html
h6 : List Attribute -> List Html -> Html

Grouping Content

div : List Attribute -> List Html -> Html

Represents a generic container with no special meaning.

p : List Attribute -> List Html -> Html

Defines a portion that should be displayed as a paragraph.

hr : List Attribute -> List Html -> Html

Represents a thematic break between paragraphs of a section or article or any longer content.

pre : List Attribute -> List Html -> Html

Indicates that its content is preformatted and that this format must be preserved.

blockquote : List Attribute -> List Html -> Html

Represents a content that is quoted from another source.

Text

span : List Attribute -> List Html -> Html

Represents text with no specific meaning. This has to be used when no other text-semantic element conveys an adequate meaning, which, in this case, is often brought by global attributes like class, lang, or dir.

a : List Attribute -> List Html -> Html

Represents a hyperlink, linking to another resource.

code : List Attribute -> List Html -> Html

Represents computer code.

em : List Attribute -> List Html -> Html

Represents emphasized text, like a stress accent.

strong : List Attribute -> List Html -> Html

Represents especially important text.

i : List Attribute -> List Html -> Html

Represents some text in an alternate voice or mood, or at least of different quality, such as a taxonomic designation, a technical term, an idiomatic phrase, a thought, or a ship name.

b : List Attribute -> List Html -> Html

Represents a text which to which attention is drawn for utilitarian purposes. It doesn't convey extra importance and doesn't imply an alternate voice.

u : List Attribute -> List Html -> Html

Represents a non-textual annoatation for which the conventional presentation is underlining, such labeling the text as being misspelt or labeling a proper name in Chinese text.

sub : List Attribute -> List Html -> Html

Represent a subscript.

sup : List Attribute -> List Html -> Html

Represent a superscript.

br : List Attribute -> List Html -> Html

Represents a line break.

Lists

ol : List Attribute -> List Html -> Html

Defines an ordered list of items.

ul : List Attribute -> List Html -> Html

Defines an unordered list of items.

li : List Attribute -> List Html -> Html

Defines a item of an enumeration list.

dl : List Attribute -> List Html -> Html

Defines a definition list, that is, a list of terms and their associated definitions.

dt : List Attribute -> List Html -> Html

Represents a term defined by the next dd.

dd : List Attribute -> List Html -> Html

Represents the definition of the terms immediately listed before it.

Emdedded Content

img : List Attribute -> List Html -> Html

Represents an image.

iframe : List Attribute -> List Html -> Html

Embedded an HTML document.

canvas : List Attribute -> List Html -> Html

Represents a bitmap area for graphics rendering.

svg : List Attribute -> List Html -> Html

Defines an embedded vectorial image.

math : List Attribute -> List Html -> Html

Defines a mathematical formula.

Inputs

form : List Attribute -> List Html -> Html

Represents a form, consisting of controls, that can be submitted to a server for processing.

input : List Attribute -> List Html -> Html

Represents a typed data field allowing the user to edit the data.

textarea : List Attribute -> List Html -> Html

Represents a multiline text edit control.

button : List Attribute -> List Html -> Html

Represents a button.

select : List Attribute -> List Html -> Html

Represents a control allowing selection among a set of options.

option : List Attribute -> List Html -> Html

Represents an option in a select element or a suggestion of a datalist element.

Sections

section : List Attribute -> List Html -> Html

Defines a section in a document.

article : List Attribute -> List Html -> Html

Defines self-contained content that could exist independently of the rest of the content.

aside : List Attribute -> List Html -> Html

Defines some content loosely related to the page content. If it is removed, the remaining content still makes sense.

address : List Attribute -> List Html -> Html

Defines a section containing contact information.

main' : List Attribute -> List Html -> Html

Defines the main or important content in the document. There is only one main element in the document.

body : List Attribute -> List Html -> Html

Represents the content of an HTML document. There is only one body element in a document.

Figures

figure : List Attribute -> List Html -> Html

Represents a figure illustrated as part of the document.

figcaption : List Attribute -> List Html -> Html

Represents the legend of a figure.

Tables

table : List Attribute -> List Html -> Html

Represents data with more than one dimension.

caption : List Attribute -> List Html -> Html

Represents the title of a table.

colgroup : List Attribute -> List Html -> Html

Represents a set of one or more columns of a table.

col : List Attribute -> List Html -> Html

Represents a column of a table.

tbody : List Attribute -> List Html -> Html

Represents the block of rows that describes the concrete data of a table.

thead : List Attribute -> List Html -> Html

Represents the block of rows that describes the column labels of a table.

tfoot : List Attribute -> List Html -> Html

Represents the block of rows that describes the column summaries of a table.

tr : List Attribute -> List Html -> Html

Represents a row of cells in a table.

td : List Attribute -> List Html -> Html

Represents a data cell in a table.

th : List Attribute -> List Html -> Html

Represents a header cell in a table.

Less Common Elements

Less Common Inputs

fieldset : List Attribute -> List Html -> Html

Represents a set of controls.

legend : List Attribute -> List Html -> Html

Represents the caption for a fieldset.

label : List Attribute -> List Html -> Html

Represents the caption of a form control.

datalist : List Attribute -> List Html -> Html

Represents a set of predefined options for other controls.

optgroup : List Attribute -> List Html -> Html

Represents a set of options, logically grouped.

keygen : List Attribute -> List Html -> Html

Represents a key-pair generator control.

output : List Attribute -> List Html -> Html

Represents the result of a calculation.

progress : List Attribute -> List Html -> Html

Represents the completion progress of a task.

meter : List Attribute -> List Html -> Html

Represents a scalar measurement (or a fractional value), within a known range.

Audio and Video

audio : List Attribute -> List Html -> Html

Represents a sound or audio stream.

video : List Attribute -> List Html -> Html

Represents a video, the associated audio and captions, and controls.

source : List Attribute -> List Html -> Html

Allows authors to specify alternative media resources for media elements like video or audio.

track : List Attribute -> List Html -> Html

Allows authors to specify timed text track for media elements like video or audio.

Embedded Objects

embed : List Attribute -> List Html -> Html

Represents a integration point for an external, often non-HTML, application or interactive content.

object : List Attribute -> List Html -> Html

Represents an external resource, which is treated as an image, an HTML sub-document, or an external resource to be processed by a plug-in.

param : List Attribute -> List Html -> Html

Defines parameters for use by plug-ins invoked by object elements.

Text Edits

ins : List Attribute -> List Html -> Html

Defines an addition to the document.

del : List Attribute -> List Html -> Html

Defines a removal from the document.

Semantic Text

small : List Attribute -> List Html -> Html

Represents a side comment, that is, text like a disclaimer or a copyright, which is not essential to the comprehension of the document.

cite : List Attribute -> List Html -> Html

Represents the title of a work.

dfn : List Attribute -> List Html -> Html

Represents a term whose definition is contained in its nearest ancestor content.

abbr : List Attribute -> List Html -> Html

Represents an abbreviation or an acronym; the expansion of the abbreviation can be represented in the title attribute.

time : List Attribute -> List Html -> Html

Represents a date and time value; the machine-readable equivalent can be represented in the datetime attribute.

var : List Attribute -> List Html -> Html

Represents a variable. Specific cases where it should be used include an actual mathematical expression or programming context, an identifier representing a constant, a symbol identifying a physical quantity, a function parameter, or a mere placeholder in prose.

samp : List Attribute -> List Html -> Html

Represents the output of a program or a computer.

kbd : List Attribute -> List Html -> Html

Represents user input, often from the keyboard, but not necessarily; it may represent other input, like transcribed voice commands.

s : List Attribute -> List Html -> Html

Represents content that is no longer accurate or relevant.

q : List Attribute -> List Html -> Html

Represents an inline quotation.

Less Common Text Tags

mark : List Attribute -> List Html -> Html

Represents text highlighted for reference purposes, that is for its relevance in another context.

ruby : List Attribute -> List Html -> Html

Represents content to be marked with ruby annotations, short runs of text presented alongside the text. This is often used in conjunction with East Asian language where the annotations act as a guide for pronunciation, like the Japanese furigana.

rt : List Attribute -> List Html -> Html

Represents the text of a ruby annotation.

rp : List Attribute -> List Html -> Html

Represents parenthesis around a ruby annotation, used to display the annotation in an alternate way by browsers not supporting the standard display for annotations.

bdi : List Attribute -> List Html -> Html

Represents text that must be isolated from its surrounding for bidirectional text formatting. It allows embedding a span of text with a different, or unknown, directionality.

bdo : List Attribute -> List Html -> Html

Represents the directionality of its children, in order to explicitly override the Unicode bidirectional algorithm.

wbr : List Attribute -> List Html -> Html

Represents a line break opportunity, that is a suggested point for wrapping text in order to improve readability of text split on several lines.

Interactive Elements

details : List Attribute -> List Html -> Html

Represents a widget from which the user can obtain additional information or controls.

summary : List Attribute -> List Html -> Html

Represents a summary, caption, or legend for a given details.