Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Approved PM markup: div but not span?

by BrowserUk (Patriarch)
on Jun 28, 2015 at 03:21 UTC ( [id://1132318]=monkdiscuss: print w/replies, xml ) Need Help??

Why is it that <div> is allowed, and <span> is not? Is there some particular vulnerability connected with <span>?


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!

Replies are listed 'Best First'.
Re: Approved PM markup: div but not span?
by kcott (Archbishop) on Jun 28, 2015 at 03:54 UTC

      Seems you're right. Though without the ability to supply inline styling (or at least an id) it might as well be totally disallowed.

        The lack of a style attribute was also my first thought; however, on reflection, it's really a lack of a style element that's the (bigger) problem.

        To elaborate on that, I have a script which generates HTML containing syntax-highlighted code, that looks something like this:

        <pre class="syntax-highlight"> ... <span class="variable">x</span> <span class="operator">=</span> <s +pan class="string">... ... </pre>

        While I wouldn't want to change, for example, every <span class="string"> instance to, say, <span style="color: #00ff00; background-color: #000000">; I might like to add one simple block like:

        <style> ... pre.syntax-highlight > span.string { color: #00ff00; background-color: #000000; } ... </style>

        However, beyond that, which really just shifts the focus of where style is missing from, I do agree with you. id is not an allowed attribute for any allowed element; the lang and dir attributes are only allowed with the blockquote element; and so on.

        There may be reasons why things are this way. Perhaps someone from pmdev could provide some feedback.

        -- Ken

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: monkdiscuss [id://1132318]
Approved by planetscape
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-19 12:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found