Can you have <li>s without them being under a <ul> or <ol>?
问题 I have a navigation that I am using a list for. I have it in a <ul> , but that is messing up my UI because it has weird automatic margins. I tried without the <ul> and they seem to work. Would this work across all browsers? Is this legal? Anybody else done this before? 回答1: It's probably working in browsers because browsers are too forgiving, but that's not valid says the validator: Document type does not allow element "li" here; missing one of "ul", "ol", "menu", "dir" start-tag Well, you