Post by Joy BeesonOn Tue, 24 Apr 2018 13:38:35 -0000 (UTC), Lewis
Post by LewisPost by Joy BeesonThe validator doesn't like un-ordered lists much, either. It was
during my attempts to find out why that I learned how to suppress the
bullets. But bullet-suppression calls for code that I find
aesthetically offensive, so the proof-of-principle page is probably
the only one that will get it.
Bullet suppression (like all appearance stuff) should be done in CSS.
ul {
list-style-type: none;
}
CSS is what I find aesthetically offensive[1]. Anyhow, aren't bullets
the whole point of using <ul><li> instead of <br>?
Nope. You are still thinking of HTML as a layout/design language, and it
moved away from that about 20 years ago.
HTML is to describe the CONTENT and CSS is to describe the APPEARANCE.
One of the large advantages of properly using HTML and CSS is that both
machines and disabled people who rely on machines can access and process
the information efficiently.
So, for example, if you define a list of items, a screen reader (or a
search engine crawler) will see that list of items. If you have random
words with <br>, neither will have any idea what those words are.
When you add a definition to a page, you can use CSS to determine how that
definition appears, and when. For example, you could have the word with
a definition show a different background, and then float the definition
when the mouse moves over the word. Or, by changing the CSS, you could
have the definitions show in the margin to the right, near the word. Or a
list at the bottom of the page. Or do all three depending on the size of
the users browser.
All without touching the HTML of the file at all.
Same content. Same information. Machine readable. Accessible.
Think of HTML as the plain text file that a book is printed from; CSS is
the font, margins, leading, kerning, chapter headings, position of
footnotes, images, and pull quotes. CSS tell the book where to put the
page numbers and chapter names and author on each page, or if to include
that information at all. Do you want a drop-cap to start your chapters?
That's all CSS. You can change the layout dramatically, but still have
the "same" book because you haven't touch the author's words.
Post by Joy BeesonWell, that and sub-lists.
Post by LewisPost by Joy BeesonThe un-ordered lists it objects to are Tables of Contents, but I don't
think there is any way the validator could know that a list is a
table.
A list is not a table.
A list can be presented as a one-row table. <ul> presents it as a
one-column table.
No, a table is a very specific thing used for one thing only, presenting
tabular data. It is MISused often in an attempt to do page layout, but
that is absolutely not what it is for.
Post by Joy Beeson[1] CSS is offensive *in this context*. It would be like sewing a
hammer loop and a trowel pocket on a bathing suit.
Not at all. The proper use of CSS allows you to take the same content
(HTML) and make it appear anyway you want and still maintain the proper
document structure. It is an exceptionally powerful way to create web
content when used properly.
--
A lot of people and the smell of sausages meant a performance of the
street theatre that was life in Ankh-Morpork.