Will this code validate?

Hello forums I’m trying to nest some divs and was wondering if this code will validate:

<div class=“sideBox”>
<div id=“content1”><p>Lorem ipsum dolor sit amet</p></div>
</div>

<div class=“sideBox”>
<div id=“content2”><p>Lorem ipsum dolor sit amet</p></div>
</div>

Is it ok to nest an id-ed div inside a class-ed div?

thanks

Completely valid code.

Yes it is, although you could have validated it to find that out for yourself ;).

Thanks Stephen

yes I could have but I’m working on my localhost and I don’t want to go into the trouble of uploading it on a live server to validate it on validator.w3.org It’ much easier to ask don’t you think? :rolleyes:

I don’t want to go into the trouble of uploading it on a live server to validate it on validator.w3.org It’ much easier to ask don’t you think?
You don’t have to upload your files to a server to validate them at W3.
It gives you the option to validate by “File Upload” and “Direct Input”.

Again there is the issue of uploading it . direct input won’t do… I have some files included using php includes and some contents on the database , and copying snippets of the code on the direct input text box won’t validate

uhmm is it so hard to just ask :frowning:

uhmm is it so hard to just ask :frowning:

You are free to ask all the questions you like around here.

I was just letting you know that files can be uploaded from your local machine to the validator and that they do not have to be on a server.

You can also check validation locally with firefox plugins like “HTML validator” and the “web developer toolbar”. :slight_smile: