W3C home > Mailing lists > Public > public-webplatform@w3.org > July 2014

Re: Formatting of html tags

From: PhistucK <phistuck@gmail.com>
Date: Fri, 18 Jul 2014 11:19:29 +0300
Message-ID: <CABc02_+4YEGmwxd23cusJKaLo=kWPeqnEC0PxPTk8r148Lr9hQ@mail.gmail.com>
To: Amelia Bellamy-Royds <amelia.bellamy.royds@gmail.com>
Cc: Renoir Boulanger <renoir@w3.org>, List WebPlatform public <public-webplatform@w3.org>
Like I wrote, I am not sure it is a real issue.

While ease of editing is important, having properly structured and semantic
data can have much more use cases (internally and externally) and we need
to think about the balance. I think a lot of editors and content creators
do not even use <code> and instead just link to the element (or not) and do
not even include angle brackets. We should strive to be consistent,
comprehensive, future proof, semantic and structured. It may higher the
bar, but we end up with much more useful data.

Regarding your P.S. -
I tried using CSS quotes with other elements - it did not work.
data:text/html,<!doctype html><code style="quotes: '<' '>'">bla</code>
It just shows "bla".
(I mean, without adding pseudo elements manually)
Whatever is more semantic and correct - go for it. :)

Regarding the class name, I would actually pick "markup-tag-html" and not
just "markup-tag", again, in order to future proof the styling and
formatting in the future (or "markup-tag html", which could save a few CSS
lines) and in order to have better semantic difference between those in
case we want to do something else for every markup namespace (make HTML
blue, make SVG orange, add a bubble with HTML or SVG image or design and so
on).


☆*PhistucK*


On Fri, Jul 18, 2014 at 2:47 AM, Amelia Bellamy-Royds <
amelia.bellamy.royds@gmail.com> wrote:

> I think it is important to display the angle brackets in the text, so that
> the meaning does not get lost when the content is read as plain text
> without formatting.  This is especially true for tag names that are also
> common English words, like <code> or <use> or <object>.
>
> On PhistucK's concern, that someone would copy&paste a sentence like the
> above into an environment where they would then have to escape all the <
> characters, I'm not sure how much of an issue that is.  More and more
> commenting platforms (at least in places where people tend to comment about
> code) have ways to escape inline code with Markdown syntax or similar.  And
> on the other hand, if the angle brackets are displayed as pseudoelements,
> then you lose some of the meaning when copying and pasting.
>
> We also have to remember that WPD is designed to be edited by a large
> group of people.  Requiring people to use complicated markup counteracts
> the ease-of-editing from the semantic forms system.
>
> The more pressing issue for WPD is the bug Pearl noted with the "Preview"
> mode when using angle bracket-tags.
>
> Mediawiki markup like
>
>
>    -  the <code>&lt;tagName&gt;</code> tag
>
> should display as
>
>
>    -  the <tagName> tag
>
> (plus the appropriate code formatting), but in Preview the extra angle
> brackets are interpretted as an actual HTML tag, and it is either stripped
> out by Mediawiki or is treated as an actual opening tag.
>
> This *only* affects Preview mode; it displays fine on the actual page.
>  However, it is a serious bug that makes the previews look broken.
>
> Thanks for offering to file the issue, Pearl.  If anyone has any knowledge
> of how the Mediawiki Preview mode works and why it is converting the &lt;
> entities to < before including it in the webpage, please take control of
> this issue.
>
> ABR
>
> P.S. If we *did* use CSS quotes to display the angle brackets, could I
> suggest that the class be added to the <code> tag.  So, instead of
> requiring people to type
>
>    - <code><q class="markup-tag">tagName</q></code>
>
> it would just be
>
>    - <code class="markup-tag">tagName</code>
>
> Note also that "html" is not a good class name for this purpose, since not
> all mark-up tags are HTML, and the purpose of the class name may be a
> little obscure for newcomers.
>
>
> On 17 July 2014 14:30, Renoir Boulanger <renoir@w3.org> wrote:
>
>> On 2014-07-17, 1:54 PM, PhistucK wrote:
>> > While I like your suggestion, I fear that the name may get lost while
>> > copying and pasting the content (pasting into an HTML source, for
>> > example).
>> > A solution could be to use pseudo elements for the angle brackets (or
>> > something like <q class="html">html</q> and have this small CSS
>> > snippet in a CSS file somewhere - q.html { quotes: "<" ">"; }, but
>> > that may not be semantic...). The goal in doing this is to show angle
>> > brackets, but ignore them when copying.
>> I like that idea.
>>
>>
>> Renoir
>> ~
>>
>>
>>
>
Received on Friday, 18 July 2014 08:20:36 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:21:02 UTC