Okay, this is a very elementary HTML question, but sometimes I over think things. You don't have to set the text alignment correct? If you don't set text-align, then your text will just be the default left to right just like this paragraph that I'm typing right now, correct? Again, I feel silly asking this because every site I've ever built I didn't worry about such small details like this. But, I have extra time on my hands today so I'm just wondering... I guess I'm also just wondering what best practice is regarding this. When you're making a website do you always set the body to text-align: left; or do you not set it at all? With my current website, I didn't set the text-align, but it still looks good in all major browsers so obviously it must not matter. But, again, I'm wondering if there is any reason why you should set the text-align? Okay so w3.org points out that by default text-align acts as 'left' if 'direction' is 'ltr', 'right' if 'direction' is 'rtl'. So if a visitor's browser is set to read text ltr then the text alignment on my site will be left, if their device is set to read rtl, then my site's alignment will change to right. I assume. I also assume that most browsers default to left to right, so, to answer my own question... text-align isn't required and my text should always be aligned "left" as long as the user's browser/device is reading from left to right. Or, the only other reason my site's text wouldn't be aligned left would be if I specifically add text-align: right; in my CSS for a particular element, for example. Taking this silly topic further then... what if someone wanted to ensure that their site's text was always aligned left... would you then add text-align: left; to the body in your stylesheet? Final update: So, I decided to just add text-align: left; to the body portion of my stylesheet. Even though left may be the default... I guess it doesn't hurt. This way I know for sure that it's set to left like I want it.
Yes unless you have it set differently somewhere else further up the chain. These things are hierarchal.
You shouldn't have to add text-align left, I only add right or center to the specific elements I want aligned right or center, if nothing on your page is going to have right or centre alignment, theres no need to add the default value again.
Congrats, you've got your answer. However, if something is by default, no need to specify it again. You don't want what is by deafult then go for other properties.
Why add formatting when none is needed? Generally, it adds to code bloat and can cause you heartburn later. I can't count the times I have changed a class only to find that a specific element did not change because someone coded the element when there was no reason to.