wml::std::grid(3)
β¨ wml::std::grid β¨
okay bestie, welcome to the wml::std::grid page from the EN Tools manual (yes it's a section 3 one, we love a library page π
). this is the one that gives you a grid. a LAYOUT GRID. let's go π
πΈ NAME πΈ
wml::std::grid β it's a Layout Grid, no cap. that's literally the whole name. iconic.
π¦ SYNOPSIS π¦
#use wml::std::grid
<grid [attributes]>
<cell [attributes]>...</cell>
:
<cell [attributes]>...</cell>
</grid>
so you pull it in with #use wml::std::grid, then you wrap everything in a <grid> tag and drop a bunch of <cell> tags inside. that's the whole vibe. π«Ά
π DESCRIPTION π
okay so the <grid> container tag is giving hybrid energy: it's a mix between an HTML table and a TeX-like way of specifying its dimensions and the alignment of its cells. like, you get to say "3x2" and mean it, bestie. the way that it just knows what you meant. π₯
π ATTRIBUTES π
π for <grid> β the main character
summaryβ this attribute gets inserted straight into thetabletag. peep the HTML 4.0 docs for the whole "why is this recommended" lore, but fr fr, it's recommended, so use it. π«layoutβ this sets the layout of the grid in X and Y dimension. so3x2means 3 columns (x-dimension) and 2 rows (y-dimension). the default is1xNCELL, where NCELL is however many cell tags you wrote β or, in other words, the default is a top-down list. very "one column, minding my own business". πalignβ horizontal alignment of the cells in a row. the argument has to have exactly as many characters as there are cells in a row, so no skipping. the supported alignment characters are"l"(left),"r"(right) and"c"(center). default is"l...l"β that's as many"l"s as there are cells in a row. so everyone's left-aligned until you say otherwise. β¬ οΈvalignβ vertical alignment of the cells in a column. same deal: the argument has to have as many characters as there are cells in a column. supported characters are"t"(top),"b"(bottom) and"m"(middle). default is"t...t"β as many"t"s as there are cells in a column. everyone starts at the top, emotionally and structurally. β¬οΈwidthβ the corresponding attribute of the HTML<table>tag. use it to set the width of the grid. default is no specified width. πspacingβ the corresponding attribute tocellspacingof the HTML<table>tag. use it to set the spacing of cells in the grid, i.e. the space around the content of each cell. default is0(no space). snug. π§paddingβ the corresponding attribute to<cellpadding>of the HTML<table>tag. use it to set the padding between cells in the grid, i.e. the inter-cell space. default is0(no space). also snug. πborderβ the corresponding attribute of the HTML<table>tag. use it to set the border width of the grid. default is0(no border). naked grid, we respect it. πbgcolorβ the corresponding attribute of the HTML<table>tag. use it to set the background color of the grid. default is no specified color. β¨colorβ this sets the foreground (text) color of the grid's contents. lowkey it actually sets the default for the same attribute of<cell>. default is no specified color. π
π for <cell> β the supporting cast (but make it fashion)
alignβ the corresponding attribute of the HTML<td>tag. use it to set the horizontal alignment of the cell's contents. default is taken from the same attribute of<grid>. so it inherits, periodt. πvalignβ the corresponding attribute of the HTML<td>tag. use it to set the vertical alignment of the cell's contents. default is taken from the same attribute of<grid>. also inheriting, also slaying. π¦bgcolorβ the corresponding attribute of the HTML<td>tag. use it to set the background color of a particular cell. default is no specified color. π¨colorβ this sets the foreground (text) color of the cell's contents. it does this via the HTML<font>tag, jsyk. default is no specified color, or the color from the same attribute of<grid>. πrowspanβ the corresponding attribute of the HTML<td>tag. use it to span a cell over more then one row of the grid. default is1row. πͺcolspanβ the corresponding attribute of the HTML<td>tag. use it to span a cell over more then one column of the grid. default is1column. πͺwidthβ the corresponding attribute of the HTML<td>tag. use it to set the width of the cell. default is no specified width. πheightβ the corresponding attribute of the HTML<td>tag. use it to set the height of the cell. default is no specified height. π
π₯ EXAMPLE π₯
okay bestie, here's the moment. a black background, white text, 3x2 layout, left-left-right alignment, top-middle vertical alignment. it's giving editorial:
<grid bgcolor="#000000" color="#ffffff"
layout="3x2" align="llr" valign="tm">
<cell>A</cell> <cell>B</cell> <cell>C</cell>
<cell>D</cell> <cell>E</cell> <cell>F</cell>
</grid>
ate. no crumbs. β
π AUTHOR π
Ralf S. Engelschall rse@engelschall.com www.engelschall.com
(we stan a legend π«Ά)
π« REQUIRES π«
- Internal:
P1,P2,P3,P5 - External:
--
π SEE ALSO π
- HTML
"table"-tag. (the grid is basically its dramatic cousin, iykyk)
heads up bestie:summaryisn't just cute, the HTML 4.0 docs literally recommend it for thetabletag, so don't leave it out and then act surprised. π
okay that's the whole page!! this came from the EN Tools corner of the world, dated 2020-11-29, and it lives in the manual as wml::std::grid(3) β so if you ever forget where you read all this, that's your receipt. go build a grid, you got this πβ¨π
π¦ where this page comes from
- debian bookworm: wml 2.32.0~ds1-1 Β· GPL-2.0-or-later
- debian trixie: wml 2.32.0~ds1-1 Β· GPL-2.0-or-later
- ubuntu jammy: wml 2.32.0~ds1-1 Β· GPL-2.0-or-later
- ubuntu noble: wml 2.32.0~ds1-1 Β· GPL-2.0-or-later
- ubuntu questing: wml 2.32.0~ds1-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms