본문으로 건너뛰기

HTML Element Mapping

How HTML elements map to Grida IR nodes. For CSS property mapping, see css.md.

Structural / Sectioning

ElementGrida IR NodeStatusNotes
<html>ContainerAlways emitted as root container
<body>ContainerAlways emitted as root container
<div>Container / RectangleContainer if has children, Rectangle if leaf
<section>Container / RectangleSame as <div>
<article>Container / RectangleSame as <div>
<nav>Container / RectangleSame as <div>
<header>Container / RectangleSame as <div>
<footer>Container / RectangleSame as <div>
<main>Container / RectangleSame as <div>
<aside>Container / RectangleSame as <div>

Text / Inline

ElementGrida IR NodeStatusNotes
<p>Container + TextSpanText content becomes TextSpan children
<h1>..<h6>Container + TextSpanText content becomes TextSpan children
<span>Container + TextSpanText content becomes TextSpan children
<strong>Container + TextSpanText content becomes TextSpan children
<em>Container + TextSpanText content becomes TextSpan children
<a>Container + TextSpanText content becomes TextSpan children; href not preserved
<br>(whitespace)⚠️Not explicitly handled; collapses into surrounding text
<sup>--No vertical-align / baseline offset in IR
<sub>--No vertical-align / baseline offset in IR

Media / Embedded

ElementGrida IR NodeStatusNotes
<img>ImageNodeRec⚠️Node type exists but src not wired
<svg> (inline)--🔮Could delegate to crate::svg pipeline
<video>--No media IR
<audio>--No media IR
<canvas>--No raster canvas IR
<iframe>--No embedded document IR

Lists

ElementGrida IR NodeStatusNotes
<ul>--No list marker generation
<ol>--No list marker generation
<li>--No list marker generation
<dl>--No definition list support
<dt>--No definition list support
<dd>--No definition list support

Table

ElementGrida IR NodeStatusNotes
<table>--No table layout IR
<tr>--No table layout IR
<td>--No table layout IR
<th>--No table layout IR

Form Controls

ElementGrida IR NodeStatusNotes
<input>--No form control IR
<button>--No form control IR
<select>--No form control IR
<textarea>--No form control IR

Non-Visual / Metadata

ElementGrida IR NodeStatusNotes
<style>(cascade)Parsed by Stylo cascade; not emitted as node
<head>--Skipped (no visual output)
<meta>--Skipped
<link>--Skipped
<script>--Skipped

Display Mode Handling

How computed display values affect node construction.

Display ValueGrida IR BehaviorStatusNotes
noneElement skippedNode not emitted
flexContainer with LayoutMode::FlexFull flex mapping
blockContainer with LayoutMode::Flex (column)⚠️Approximated as flex column
inline(treated as block)⚠️No true inline layout
grid--No grid IR
inline-flex--No inline layout model
inline-block--No inline layout model