i'm interested in how we write about code,
and i think we should use standards in as many places as possible.
the document explores some of the standard html tags
that i'm not aware of, or forgot about.
# all the tags i could be using
i'm interested in how we write about code,
and i think we should use standards in as many places as possible.
the document explores some of the standard html tags
that i'm not aware of, or forgot about.
let's look through the standard html tags and see what opinions we can reuse.
i'm interested in how we write about code,
and i think we should use standards in as many places as possible.
the document explores some of the standard html tags
that i'm not aware of, or forgot about.
let's look through the standard html tags and see what opinions we can reuse.
## motivation
this exercise is useful for me because i like to write in markdown
which has a limited design affordances.
since markdown is a superset of html we can reuse standard tags as design units in our literate programming.
this exercise is useful for me because i like to write in markdown
which has a limited design affordances.
since markdown is a superset of html we can reuse standard tags as design units in our literate programming.
### a concrete example is the `<var/>` tag > The <var> HTML element represents the name of a variable in a mathematical expression or a programming context. It's typically presented using an italicized version of the current typeface, although that behavior is browser-dependent. <cite>[The Var Text element][var]</cite>
based on definition the `<var>` tag seems like perfect way
to style variables defined within a program.
*i do not agree with the style, but i agree with the semantics.
*to derive intertextuality between code/narrative. `pre` tags seems to make more sense between there forms will be most consistent. the monospace indicates that this reads code.
*maybe the code has a different style itself.
[var]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/var "the var tag documention on mdn"
The
HTML element represents the name of a variable in a mathematical expression or a programming context. It's typically presented using an italicized version of the current typeface, although that behavior is browser-dependent.
The Var Text element
based on definition the
<var>
tag seems like perfect way
to style variables defined within a program.
i do not agree with the style, but i agree with the semantics.
to derive intertextuality between code/narrative.
pre
tags seems to make more sense between there forms will be most consistent. the monospace indicates that this reads code.
### style choiceswhiletoyingwiththedocumentirealizethatsomefolksmightbecaughtupbystyleinconsistencieswiththetags.i'm changing some styles used in this document.thegoalofthisissemanticconsistencysostylematterslesstoday.style=\
```cssvar{font-family:monospace;whitespace:pre;font-weight:bold;}mark{background-color:lightblue;}a:link{font-weight:bold;}```<style>{{style.splitlines(True)[1:-1]|join}}</style>
### choosing a resourcewearegoingtorefertothe<var>mdn</var>docs:*<var>mdn</var>hasmoredescription*the<var>mdn</var>docshave{{len(mdn_extras)}}moretagsdefined.afterfurtherinspectionthesemaybemostlydeprecatedtags.*<var>mdn</var>breakstheirtablesintogroupsbetweenthetworesourcesthereare{{len(AB)}}tagstoexplore.<divhidden>A=pandas.concat(dfs:=pandas.read_html(io.StringIO(requests.get(mdn).text))).set_index("Element")B=pandas.concat(pandas.read_html(io.StringIO(requests.get(w3schools).text))).set_index("Tag")AB=A["Description"].to_frame("mdn").join(B["Description"].rename("w3schools"),how="outer")mdn_extras=AB["mdn"].index.symmetric_difference(AB["w3schools"].dropna().index).to_frame().index</div>
### the `html` tag<cite>[UsingthelanguageattributeontheHTMLelement]</cite>requiresthe`lang`attributetobedefined.otherwise,mostautomatedtestingwithfail.{{dfs[0]}}[UsingthelanguageattributeontheHTMLelement]:https://www.w3.org/WAI/WCAG22/Techniques/html/H57
### inline text content*avariablecouldbean:`a,abbr,dfn,mark,ruby,var`*therearedifferentreferencestocodedobjectslike:`var,code,samp`*thesedifferentiationscanhelpanauthorgivemoresemanticmeaningdfs[5]