+ 10
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?
7 Answers
+ 22
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.
+ 5
lowercase is more common, also it may cause confusion for others when they read your code.
+ 4
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.
+ 3
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! ;)
+ 1
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
+ 1
i recommend lowercase :)
+ 1
<html lang="en" dir="ltr"></html>