semantically replacing unordered list (UL) free text
semantically replacing unordered list (UL) free text
I have found validating under HTML5, the validator is throwing up errors for using free text with an unordered list.
EG.
CODE
<ul>some free text <li>1st list item</li> <li>2nd list item</li> </ul>
So I have replaced this free text within the <ul> tag with a HTML5 <figure> tag.
EG.
CODE
<figure> <figcaption>some free text</figcaption> <ul> <li>1st list item</li> <li>2nd list item</li> </ul> </figure>
Would you agree that this is semantically correct, or should I be using something else?
Your input is appreciated.
1DMF
"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music
RE: semantically replacing unordered list (UL) free text
The figure element is the HTML equiv of having "See fig x:" in a text book or a encyclopedia.
But on the other hand, you already know my opinion of HTML spell checkers
Chris.
Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
RE: semantically replacing unordered list (UL) free text
Here it is in context
CODE
Though you may not agree nor care about validation, it's good practice to validate your code and to consider the semantics of the tags vs content you use.
Was using free text in an unordered list ever actually semantic even when it did validate?
1DMF
"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music
RE: semantically replacing unordered list (UL) free text
CODE
<ul> s can only ever contain <li> elements. Nothing else. by moving the text outside of the UL, you've created a different and correct markup.
For that purpose even this would be correct:
CODE
----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
Web & Tech
RE: semantically replacing unordered list (UL) free text
Not sure why there was content marked-up like that in the first place, but I have read that under HTML5, it would be semantically incorrect to just keep wrapping content in divs like we used to do.
Apparently it's no different than when we used to use tables for layout.
There are a few new semantic tags for these purposes, notably :- header, main, footer, nav, menuitem
Which are fairly obvious, I'm now trying to get a feel for the others :- section, figure, details, aside.
Though header/footer can be used in a section tag, I feel this is more for blog/article type content along with the article tag.
I have also read that arbitrarily replacing all your divs with section tags would also be incorrect, so I am trying to find a balance.
As always, your input is appreciated.
1DMF
"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music
RE: semantically replacing unordered list (UL) free text
The details tag now replaces some Js and gives you the ability to show and hide details of an element.
Most of the other ones are pretty self explanatory.
----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
Web & Tech
RE: semantically replacing unordered list (UL) free text
I also find it puzzling that 'header' and 'footer' are supported by IE, but not 'main', yet to me they seem semantically linked?
Maybe IE 14 on Windows 10 will support it
"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music
RE: semantically replacing unordered list (UL) free text
Chrome Canary seems to support it but you must enable a flag in its settings.
As for IE, MS is always behind in the game. Which is why its a pain coding a website that looks the same in IE and other more standards compliant browsers. I've chosen to not make my websites look perfect on IE, only decent and operational.
So while I can get nice effects in Chrome and FF and Safari with CSS, I've given up on IE and just let it render whatever it can. As long as its usable and doesn't look horrid. I simply cannot justify pouring more time into IE to get it to look the same. Specially with all the different rendering outputs it provides from version to version. Its just too much.
Besides unless you are a corporate goon tied down by an IT department to some version of IE you should be using FF or Chrome on any platform.
----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
Web & Tech
RE: semantically replacing unordered list (UL) free text
Well as I know 90% of my users are using IE, I make it work on IE , then Chrome and care less about FF, especially as FF is now considered one of the moist insecure browsers of them all.
The new app I'm building targets HTML5 only browsers, so anyone not using IE10+ will have to install another, which currently I offer them Chrome, FF or Opera, we don't support Apple, so don't worry about Safari.
I find less layout issues with IE these days, it's just IE9 and its pathetic attempt at HTML5 that nearly pushed me over the edge, till I gave up with polyfils and shims and am a much happier bunny only supporting IE10+
"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music
RE: semantically replacing unordered list (UL) free text
As for FF's security, most of it comes from plugins and they way they are handled. Also the security ratings fro browsers tend to almost always be skewed depending on who is paying for them or making them. Microsoft funded ones always put IE at the top, Google's make Chrome the best. FF goes with the flow and personally I've never had any issues with it. In fact for some development FF is my main testing browser because it has a couple of plugins I use a lot. Modify Headers and User Agent Switcher are quite useful.
Mostly, any browser can be insecure depending on how you use it.
----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
Web & Tech