Husband, Father, Software Engineer (PHP, go, etc.). Lover of Star Trek and anime.
Looking for other things to do, such as writing, acting, voice acting, but not really finding the time for it. Maybe when my kids are a little older, I'll get back on stage.
Feeling pretty bleak about the future of the United States. #NeverTrump
Feel free to follow. I may follow back if we seem to have similar interests.
#BlackLivesMatter #TransRightsAreHumanRights #StayWoke
Other interests: #Parenting #StarTrek #Writing #Theater #anime #PHP #golang #Programming #WebDevelopment #genealogy #ScienceFiction #DadJokes
- My Links
- Pronouns
he/him/his
- XMPP
- Mastodon account
- Résumé
in reply to this object
I found my answer, according to MDN.
The <pre>
tag allows as children any "phrasing content". <code>
is included in that. So, <pre><code> ... </code></pre>
is valid.
However, <code>
also allows "phrasing content" as children. And <pre>
is not included in that. So <code><pre> ... </pre></code>
is invalid.
Hey #WebDevs. Got an #HTML question.
When combining the
code
andpre
tags, which one should go inside which?Should it be
<code><pre> ... </pre></code>
, or<pre><code> ... </code></pre>
.I need to do both because the code in question might have line breaks, so
pre
will ensure that those are rendered correctly.It seems to work either way.
pre
on the outside adds some extra margin, I think. I didn't look at it too closely.But, I'm not sure which is the more correct way.
#AskFedi #AskWebDev