For general web development questions that are not specifically related to CSS HTML Validator. This includes (but is not limited to) general HTML, CSS, Accessibility, JavaScript, and SEO questions.
Checking my document that is HTML5 gives me the following tip:
Never use "ul" elements (nor "dl" elements) only to create indentation. This is bad practice, bad for accessibility, and ignores the meaning of the "ul" element. Use CSS to indent and style instead.
I can easily change it to a combination of margin-left-25px and using &bull for the bullet. However, what about an indented line that wraps.
How do I get the indented line to wrap so that the beginning of the wrapped indented line lines up with the text above it? I don't want the wrapped indented line to be even with the bullet. It needs to be indented.
Last edited by paulp575 on Wed Jul 21, 2021 11:56 pm, edited 1 time in total.
Are you listing things in a bulleted list? In that case it sounds like you are using "ul" properly (to create a list). The message about using the "ul" element to indent is when "ul" is used to indent a paragraph or something else that is not a list.
paulp575 wrote: ↑Wed Jul 21, 2021 5:12 pm
Yes, I am using "ul" to indent a list.
So I guess that "tip" I'm seeing is just a reminder; not necessarily a problem.
I always try to ensure all of my web pages are as free as possible from errors/warnings.
Yes, it's just a tip not to use a list element like "ul" to indent... because "ul" is for creating an unordered list, not for indenting. I think this was more of a problem in the past when it was more often used to indent text (or something else) that wasn't actually a list.