HTML is case insensitive but which one is more preferable? <html>, <HTML> or <hTmL> | Sololearn: Learn to code for FREE!


HTML is case insensitive but which one is more preferable? <html>, <HTML> or <hTmL>

I have seen people writing html tags in uppercase and lowercase. To me lowercase look nice. Which one do you recommend?

5/3/2017 4:05:35 PM

Wisdom Abioye

7 Answers

New Answer


Lowercase should be preferred because according to me, it gives a cleaner look to our code. And now after getting basic knowledge of other programming languages, I always write HTML code in lowercase.


lowercase is more common, also it may cause confusion for others when they read your code.


my first book about html taught the tags and attributes in uppercase, but the values of the attributes in lowercase. I prefer lowercase though, because it's easier to write and read than uppercase.


Lowercase is what I have encountered most. But as you said, HTML is case insensitive, so it doesn't matter whether lower- or uppercase. BUT whatever style you choose, be CONSISTENT, i.e. if you choose lowercase, then stick to it. Hope that helps. Happy coding! ;)


just lowercase. It's a bad habit to use uppercase/camelcase on html tags. It's case insensitive but sometimes some errors can come up


i recommend lowercase :)


<html lang="en" dir="ltr"></html>