JD_Toims,
Yes, you could even wrap your sections in a <div> or put a <div> within the <section> wrapping the content and style the <div> rather than the <section> for backward compatibility.
eg
<section>
<div class="section">
<p>stuff here</p>
</div>
</section>
<div class="section">
<section>
<p>stuff here</p>
</section>
</div>
Thanks for the response. I think that what you coded is something that I could do. I would appreciate if you could help me with a couple of questions that I had about using the <div> tag.
Does using <div class="section"> help with older browsers that don’t recognize HTML5 elements like <section> by including something that the browser recognizes (e.g., <div>) with something that it does not (e.g., <section>) recognize so the text displays the way that it is styled, or does using
<div class="section"> help with making elements like <section> that are not compatible with a particular DOCTYPE become compatible with it and, as a result, the text displays the way that it is styled? Or does the use of <div class="section"> help with both?
If there is more than one type of tag inside the <div> and the content in those tags is styled differently, what should I do? I don’t think that I would be able to put a <section> inside a <div> because I have several elements (e.g., <p> and <h2>) to include and they would be styled differently. I probably have to put the <div> tags inside the <section> tag? Would I need a <div> for the several <p> tags and a <div> for the <h2> tag, and both of those <div> tags are inside <div class="section">? Essentially several <div> tags inside a main <div> tag?
Would it be okay to do this with my DOCTYPE?
What could I name each of the <div> tags inside the main <div> (I think what I am asking here is does what I name a <div> tag matter, or does it not because the elements inside the <div>, such as <p> and <h2>, can be understood by the search engines?)? I am thinking that the main <div> would probably be <div class="section">?
Is the following a possibility:
<section>
<div class="section">
<div class="paragraph">
<p>stuff here</p>
<p>stuff here</p>
</div>
<div class="heading">
<h2>stuff here</h2>
</div>
<div class="paragraph">
<p>stuff here</p>
</div>
</div>
</section>
I know that this post is a little detailed, but I think that these questions will really help me to understand what I have to do to use HTML5 elements.
[edited by: gouri at 11:28 pm (utc) on Jan 16, 2014]