Divooka Reference

HTML

31 nodes

On this page 31

Add Class

Function

An element with one more class - the same element, so it can be wired on.

Signature
AddClass(element: HTML Element, name: Text) -> HTML Element
HtmlElement AddClass(HtmlElement element, string name = "")

Parameters

nametypedefaultdescription
elementHTML Element—The element.
nameText—The class.

Returns

ElementHTML Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

Add Style

Function

An element with one more CSS declaration in its inline style - the same element, so it can be wired on.

Signature
AddStyle -> HTML Element
    element: HTML Element
    property: Text
    value: Text
HtmlElement AddStyle(
    HtmlElement element,
    string property = "",
    string value = "")

Parameters

nametypedefaultdescription
elementHTML Element—The element.
propertyText—The CSS property: color, margin, font-weight.
valueText—Its value: teal, 1em, bold.

Returns

ElementHTML Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

Attribute

Function

An element with an attribute of the given name set to the value - the same element, so it can be wired on. Given twice, a name keeps its last value.

Signature
Attribute -> HTML Element
    element: HTML Element
    name: Text
    value: Text
HtmlElement Attribute(
    HtmlElement element,
    string name = "",
    string value = "")

Parameters

nametypedefaultdescription
elementHTML Element—The element.
nameText—The attribute's name: data-id, aria-label, lang.
valueText—Its value.

Returns

ElementHTML Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

Body

Function

A page's body: what the page shows, in the order its pieces are wired in.

Signature
Body(content: HTML Node Array) -> HTML Body
HtmlBody Body(HtmlNode[] content)

Parameters

nametypedefaultdescription
contentHTML Node Array—The pieces the page shows.

Returns

BodyHTML Body
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

Button

Function

A button: one that sends its form, puts it back as it started, or does nothing of its own.

Signature
Button(text: Text, kind: HTML Button Kind) -> HTML Button
HtmlButton Button(
    string text = "Submit",
    HtmlButtonKind kind = HtmlButtonKind.Submit)

Parameters

nametypedefaultdescription
textTextSubmitThe button's words.
kindHTML Button KindSubmitWhat it does when pressed.

Returns

ButtonHTML Button
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

Division

Function

A division: a box around the pieces wired into it, for a class or a style to lay out.

Signature
Division(content: HTML Node Array) -> HTML Element
HtmlElement Division(HtmlNode[] content)

Parameters

nametypedefaultdescription
contentHTML Node Array—The pieces inside it.

Returns

DivisionHTML Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

Document

Function

A whole page: its head and its body.

Signature
Document -> HTML Document
    head: HTML Head
    body: HTML Body
    language: Text
HtmlDocument Document(
    HtmlHead head,
    HtmlBody body,
    string language = "en")

Parameters

nametypedefaultdescription
headHTML Head—The page's head: its title and stylesheets.
bodyHTML Body—The page's body: what it shows.
languageTextenThe language the page is written in, as a language code: en, zh, fr.

Returns

PageHTML Document
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

Element

Function

An element of any tag - article, nav, footer, strong, em, code - for whatever no other node makes.

Signature
Element -> HTML Element
    tag: Text
    text: Text
    content: HTML Node Array
HtmlElement Element(
    string tag = "div",
    string text = "",
    HtmlNode[] content)

Parameters

nametypedefaultdescription
tagTextdivThe tag: letters, digits and hyphens, starting with a letter.
textText—Its words.
contentHTML Node Array—Pieces after its words.

Returns

ElementHTML Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

Form

Function

A form: the fields wired into it, sent to an address when it is submitted.

Signature
Form(action: Text, fields: HTML Node Array) -> HTML Form
HtmlForm Form(string action = "", HtmlNode[] fields)

Parameters

nametypedefaultdescription
actionText—Where the form is sent; empty for the page's own address.
fieldsHTML Node Array—The fields and buttons, in order.

Returns

FormHTML Form
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

Heading

Function

A heading: level 1 for the page's own, 2 for a section's, down to 6.

Signature
Heading -> HTML Heading
    text: Text
    level: Integer
    content: HTML Node Array
HtmlHeading Heading(
    string text = "",
    int level = 1,
    HtmlNode[] content)

Parameters

nametypedefaultdescription
textText—The heading's words.
levelInteger11 to 6.
contentHTML Node Array—Pieces after its words: a link, a span.

Returns

HeadingHTML Heading
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

Image

Function

An image, by its address, with the words that stand for it where it cannot be seen.

Signature
Image(source: Text, description: Text) -> HTML Image
HtmlImage Image(string source = "", string description = "")

Parameters

nametypedefaultdescription
sourceText—The image's address: a web address, or a file beside the page.
descriptionText—What the image shows, in words.

Returns

ImageHTML Image
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

Input

Function

An input field: a line of text, an email address, a number, a date, a box to tick - with the words that say what it is for.

Signature
Input -> HTML Input
    kind: HTML Input Kind
    name: Text
    label: Text
HtmlInput Input(
    HtmlInputKind kind = HtmlInputKind.Text,
    string name = "",
    string label = "")

Parameters

nametypedefaultdescription
kindHTML Input KindTextWhat the field takes.
nameText—The name its value is sent under.
labelText—The words beside it.

Returns

InputHTML Input
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

List

Function

A list of the pieces wired into it, each an item - bulleted, or numbered.

Signature
List(items: HTML Node Array, numbered: Truth) -> HTML List
HtmlList List(HtmlNode[] items, bool numbered = false)

Parameters

nametypedefaultdescription
itemsHTML Node Array—The items, in order; a piece that is not a list item is put in one.
numberedTruthFalseWhether the items are numbered.

Returns

ListHTML List
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

List Item

Function

One item of a list: its words, then any pieces wired into it.

Signature
ListItem(text: Text, content: HTML Node Array) -> HTML Element
HtmlElement ListItem(string text = "", HtmlNode[] content)

Parameters

nametypedefaultdescription
textText—The item's words.
contentHTML Node Array—Pieces after its words.

Returns

ItemHTML Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

List of Texts

Function

A list whose items are the given words, one item each.

Signature
ListOfTexts(items: Text Array, numbered: Truth) -> HTML List
HtmlList ListOfTexts(string[] items, bool numbered = false)

Parameters

nametypedefaultdescription
itemsText Array—Each item's words, in order.
numberedTruthFalseWhether the items are numbered.

Returns

ListHTML List
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

Paragraph

Function

A paragraph: its words, then any pieces wired into it - a link, a span, an image - which run on in its line.

Signature
Paragraph(text: Text, content: HTML Node Array) -> HTML Element
HtmlElement Paragraph(string text = "", HtmlNode[] content)

Parameters

nametypedefaultdescription
textText—The paragraph's words.
contentHTML Node Array—Pieces after its words.

Returns

ParagraphHTML Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

Raw HTML

Function

HTML put into the page exactly as written, for markup no node makes.

Signature
RawHtml(markup: Text) -> Raw HTML
HtmlRaw RawHtml(string markup = "")

Parameters

nametypedefaultdescription
markupText—The HTML.

Returns

HTMLRaw HTML
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

Save Page

Function

Writes a page to a file as UTF-8, making the folder it goes in.

Signature
Save(page: HTML Document, path: Text)
void Save(HtmlDocument page, string path = "Page.html")

Parameters

nametypedefaultdescription
pageHTML Document—The page.
pathTextPage.htmlThe file: a full path, or one relative to the folder the document runs in.
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

Section

Function

A section of the page: a part of it with a heading of its own, around the pieces wired into it.

Signature
Section(content: HTML Node Array) -> HTML Element
HtmlElement Section(HtmlNode[] content)

Parameters

nametypedefaultdescription
contentHTML Node Array—The section's pieces.

Returns

SectionHTML Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

Select

Function

A drop-down of choices, with the words that say what it is for.

Signature
Select -> HTML Select
    name: Text
    options: Text Array
    label: Text
HtmlSelect Select(
    string name = "",
    string[] options,
    string label = "")

Parameters

nametypedefaultdescription
nameText—The name the choice is sent under.
optionsText Array—The choices, in the order shown.
labelText—The words beside it.

Returns

SelectHTML Select
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

Span

Function

A run of words inside a line - a paragraph's, a heading's - that a class or a style can pick out.

Signature
Span(text: Text, content: HTML Node Array) -> HTML Element
HtmlElement Span(string text = "", HtmlNode[] content)

Parameters

nametypedefaultdescription
textText—Its words.
contentHTML Node Array—Pieces after its words.

Returns

SpanHTML Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

Stylesheet

Function

A stylesheet written into the page's head: CSS rules for its elements by tag, .class and #id.

Signature
Stylesheet(rules: Text) -> HTML Stylesheet
HtmlStylesheet Stylesheet(string rules = "")

Parameters

nametypedefaultdescription
rulesText—The CSS rules: h1 { color: teal; }.

Returns

StylesheetHTML Stylesheet
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

Table

Function

A table: column headings over the rows wired into it.

Signature
Table -> HTML Table
    header: Text Array
    rows: HTML Table Row Array
HtmlTable Table(string[] header, HtmlTableRow[] rows)

Parameters

nametypedefaultdescription
headerText Array—The column headings, left to right.
rowsHTML Table Row Array—The rows, top to bottom.

Returns

TableHTML Table
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

Table from Columns

Function

A table made from columns of data: one list per column, each wired into Columns in order - names, numbers, truths, dates - and a row for each position down them. A number is written as it reads in a box, with a dot and its digits in full; a column shorter than the rest leaves its cells empty.

Signature
TableFromColumns -> HTML Table
    header: Text Array
    columns: Array Array
HtmlTable TableFromColumns(string[] header, Array[] columns)

Parameters

nametypedefaultdescription
headerText Array—The column headings, left to right.
columnsArray Array—The columns, one list each, left to right.

Returns

TableHTML Table
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

Table Row

Function

One row of a table: its cells' words, left to right.

Signature
TableRow(cells: Text Array) -> HTML Table Row
HtmlTableRow TableRow(string[] cells)

Parameters

nametypedefaultdescription
cellsText Array—The cells, left to right.

Returns

RowHTML Table Row
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

Text

Function

Text, written as it is: a < reads as a <, never as a tag.

Signature
Text(text: Text) -> HTML Text
HtmlText Text(string text = "")

Parameters

nametypedefaultdescription
textText—The text.

Returns

TextHTML Text
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

Text Area

Function

A box for several lines of text, with the words that say what it is for.

Signature
TextArea(name: Text, label: Text) -> HTML Text Area
HtmlTextArea TextArea(string name = "", string label = "")

Parameters

nametypedefaultdescription
nameText—The name its text is sent under.
labelText—The words beside it.

Returns

Text AreaHTML Text Area
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications

To HTML

Function

A page - or any piece of one - as HTML text: a whole page starts with its doctype.

Signature
ToHtml(page: HTML Node) -> Text
string ToHtml(HtmlNode page)

Parameters

nametypedefaultdescription
pageHTML Node—The page, or any piece of one.

Returns

HTMLText
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HTML
Package
Web Applications