The Japanese V2, American V2 and European clients contain an HTML parser alongside the UGO reader. Their parser accepts a specific set of tags and attributes; it does not repair documents or create controls in the same way as a current web browser. The following behaviour was checked in those three original ARM9 programs. It has not been established for Japanese V1. [1]
Document structure
Use an explicit head followed by an explicit body. The head reader finishes at a recognised closing head tag, even if it did not encounter an opening head first. The body reader searches for its opening tag; a tested document without one faults at that entry. These permissive head rules do not make a missing body safe. Use one external stylesheet: a second stylesheet link replaces the first slot, and an embedded style block does not invoke the CSS reader. [1]
<html>
<head>
<title>Collection</title>
<link rel="stylesheet" href="collection.css">
<meta name="uppertitle" content="Collection">
</head>
<body><div class="card"><a href="recent.htm">Recent Flipnotes</a></div></body>
</html>
This is an authoring example. Its class rule must use div.card, as explained in CSS and layout. [1]
Recognised tags
The general classifier has these 49 names. Tag names are case-insensitive and require a token boundary: divx is not div. The IDs identify internal node kinds, rather than values sent in an HTTP header. [1]
| Tag | ID |
|---|---|
| html | 0 |
| body | 1 |
| p | 2 |
| div | 3 |
| table | 4 |
| tr | 5 |
| th | 6 |
| td | 7 |
| dl | 8 |
| ul | 9 |
| ol | 10 |
| form | 11 |
| address | 12 |
| blockquote | 13 |
| h1 | 14 |
| h2 | 15 |
| h3 | 16 |
| h4 | 17 |
| h5 | 18 |
| h6 | 19 |
| fieldset | 20 |
| hr | 21 |
| pre | 22 |
| button | 24 |
| img | 25 |
| input | 26 |
| object | 27 |
| a | 28 |
| abbr | 29 |
| acronym | 30 |
| b | 31 |
| bdo | 32 |
| big | 33 |
| cite | 34 |
| code | 35 |
| dfn | 36 |
| em | 37 |
| i | 38 |
| kbd | 39 |
| label | 40 |
| q | 41 |
| samp | 42 |
| small | 43 |
| span | 44 |
| strong | 45 |
| sub | 46 |
| sup | 47 |
| tt | 48 |
| var | 49 |
There is no tag at ID 23. ID 50 is an internally created text node. Separate workers recognise br, and the head scanner recognises meta, link, title and closing head. Those names therefore need not appear in the general classifier. [1]
Names absent from that classifier include li, dt, dd, table section wrappers, style, script, iframe, select, option, textarea, font, center, canvas, svg, audio, video, section and nav. Unknown wrappers are not consistently discarded: a tested list retained literal li> fragments. Use paragraphs or table rows for a list. Recognising a formatting tag does not establish a different font or a working form control. [1]
Attribute rules
- Attribute names are case-sensitive. Write lowercase names with no space before the equals sign and double-quoted values.
- The common
class=branch stores one name, using only its first eight ASCII bytes. Letters, digits, underscore, hyphen and#are accepted name characters. Names differing only after byte eight collide. - A space-separated class list is not supported. On a paragraph, the remaining bytes in
class="one two"can stop attribute processing. - Anchors recognise
href,rel,target,name,accesskey,mailto,tabindexandusemap. Only href and the case-sensitiverel="flat"alter the examined node. The other names are skipped. - Spans accept the same eight names without installing an href. Images have their own five-name parser. Divisions and table elements use the table-family parser below. Other elements have no general attribute worker after class processing.
An unsupported attribute can discard the rest of a tag, or stop the body parser. An anchor with id before href loses its destination; putting href first retains that destination before processing stops. A division with id before class loses the class. A paragraph carrying id can stop parsing before its own text. Avoid generic id, data, ARIA and inline-style attributes in client documents. A single-quoted href retains the closing apostrophe in the tested URL; double quotes avoid this problem. [1]
Recognised form, input and button tags do not have ordinary form-control handlers. Attributes such as action, method, type, name and value can stop body parsing instead of creating a working form. For text entry, use an anchor to the native .kbd route and implement its request/continuation contract. The presence of the tag in the classifier is not evidence of browser-style input controls. [1]
| Attribute | div | table | tr | th / td |
|---|---|---|---|---|
| align | Alignment | Alignment | Alignment | Alignment |
| height / width | Skipped | 16-bit dimensions | Skipped | 16-bit dimensions |
| border | Skipped | Positive width on all sides | Skipped | Skipped |
| bordercolor | Skipped | Four side colours | Skipped | Skipped |
| cellpadding / cellspacing | Skipped | Table fields | Skipped | Skipped |
| bgcolor | Skipped | Background colour | Background colour | Background colour |
| background | Skipped | Skipped | Skipped | Skipped |
| valign | Skipped | Skipped | Vertical alignment | Vertical alignment |
| colspan / rowspan | Skipped | Skipped | Skipped | Span counts |
| nowrap | Parsing failure | Parsing failure | Parsing failure | Changes a byte before parsing fails |
Alignment tokens are the case-sensitive names left, center and right. Numeric fields use decimal-prefix conversion: a percentage suffix does not enable percentage sizing. The shared nowrap skip length fails to advance past its equals sign; even a cell that changes its style byte then fails the surrounding parse. CSS white-space does not provide an alternative no-wrap implementation. [1]
Text and entities
Consecutive ASCII spaces collapse. Tabs and line feeds are skipped, so they can join adjacent words. A carriage return advances by two bytes as though CRLF follows; a lone carriage return can consume the following character. Closed comments are skipped. A body-level br inserts CRLF into its text, but the inline worker handles the token differently: a span containing Before, br and After ended with literal br>After instead of retaining the full text. Prefer separate paragraphs. [1]
Only the lowercase named entities lt, gt, amp and nbsp are recognised. Nbsp becomes ordinary U+0020 space. Other names lose their ampersand: quot and apos do not insert quotation marks. Decimal character references work in the checked text paths; hexadecimal references do not. An entity immediately before the reader's terminating delimiter can be lost, including an ampersand at the end of body text. Use literal UTF-8 text where the font supports it. [1]
The UTF-16 conversion helper handles one-, two- and three-byte UTF-8 sequences. It has no four-byte branch; the tested emoji became four question marks. Body strings remain UTF-8 until layout. This distinction describes conversion, not complete font coverage. A charset meta entry does not select another decoder in the examined head reader. [1]
Head metadata
The reader clears a 4,388-byte result before parsing. Write name before content, with both attribute names and the metadata name in lowercase. Content encountered before a name has no selected destination. The 26 recognised names are below; offsets refer to this result structure, and flags accumulate in the word at +0xC04. [1]
| Name | Storage or flag | Meaning |
|---|---|---|
| upperlink | +0x101 | Upper image or animation URL |
| uppertitle | +0xC10 | UTF-16 upper title |
| uppersubleft | +0xD10 | UTF-16 left subtitle |
| uppersubright | +0xE10 | UTF-16 right subtitle |
| uppersubtop | +0xF10 | UTF-16 top subtitle; +0x1110 becomes 1 |
| uppersubbottom | +0x1010 | UTF-16 bottom subtitle |
| uppersubtitle | +0xF10 | Same text slot as uppersubtop; +0x1110 becomes 0 |
| starbutton | +0x302 | Yellow-star action URL |
| starbutton1 | +0x402 / +0x1114 | Action URL and 32-bit count |
| starbutton2 | +0x502 / +0x1118 | Action URL and 32-bit count |
| starbutton3 | +0x602 / +0x111C | Action URL and 32-bit count |
| starbutton4 | +0x702 / +0x1120 | Action URL and 32-bit count |
| favoritebutton | +0x802 / flag 0x001 | Favourite action |
| cutoutbutton | +0x802 / flag 0x200 | Shares the favourite URL slot |
| deletebutton | +0xA02 | Delete action URL |
| postchannelbutton | +0x902 / flag 0x002 | Shared action URL |
| playcontrolbutton | flag 0x004 | Flag set by the metadata name |
| savebutton | +0x902 / flag 0x008 | Shared action URL |
| commentbutton | +0x902 / flag 0x010 | Shared action URL |
| postherebutton | +0x902 / flag 0x020 | Shared action URL |
| commentherebutton | +0x902 / flag 0x040 | Shared action URL |
| replybutton | +0x902 / flag 0x400 | Shared action URL |
| autoscroll | flag 0x080 | Flag set by the metadata name |
| bgm | +0xC08 | Decimal content plus one, stored as a signed 16-bit value |
| autoplay | flags 0x100 / 0x800 | 0x100 on recognition; also 0x800 when content is decimal 1 |
| background | +0xB02 / +0xC0C / +0xC0E | URL followed by 16-bit width and height |
The ordinary title occupies a separate UTF-16 slot at +0x202. Its conversion capacity is 127, allowing 126 contiguous code units and a terminator. The six upper text fields have capacity 128, allowing 127 code units. These are storage limits, not estimates of visible text space. Numbered star values use URL,count; backgrounds use URL,width,height. Several action names share +0x902, and some upper subtitles share a text slot: repeated declarations can overwrite a URL or text while retaining earlier flag bits. [1]
Allocation limits
The parser allocates up to 1,024 nodes of 44 bytes and 512 styles of 80 bytes. Node allocation also checks the style count. Text and URLs share storage whose copy guard is 0xFF9C, or 65,436 bytes. A new descendant is refused when the nesting counter is already greater than 19; a new table is refused when its table counter is already greater than two, before incrementing. These guards have different meanings and do not guarantee graceful handling of every exhausted pool. See loading and resource limits before sizing a page. [1]
Research scope
The parser and metadata checks execute the original instructions in all three V2 builds. They establish stored nodes, strings and metadata, including deliberately checked failure paths. They do not establish final screen pixels, physical touch behaviour or complete network operation. Japanese V1 requires its own mapping. [1]
