I copied your code and it works just fine. The error must be somewhere else. I noticed that you are missing closing </ul tag. Check the rest of your code, maybe you have another unclosed tag, missing quotation mark, or something else that is interfering with the rest of your code. I would recommend using HTML validator, such as https://validator.w3.org/
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…