+ 1

Why it is necessary to use <ol> and <li> tags as we can also use <p> tag with <br> tag?

21st Nov 2016, 5:28 PM
mathew varghese
mathew varghese - avatar
2 Réponses
+ 1
Because it shows that it is an ordered list. It might be more useful to things you may not think about. Compatibility with screen readers for the blind or just helps look better for formatting purposes.
21st Nov 2016, 5:37 PM
Jeremy Self
Jeremy Self - avatar
+ 1
ol and ul are for formatting purpose. yes u can do the same thing with <p> and <br/> tags but browser will take this as paragraph and a breaking line within paragraph if you use ol and ul browser will identify that there is a list in your web page moreover ul and ol are use for many other purposes like menus for navigation
22nd Nov 2016, 4:48 AM
Shayan
Shayan - avatar