0

Hello this is my first post here :)

I have designed my site layout completely from Divs and CSS style it.

I have scince realised that I should'nt have used just divs so I am trying to reduce the amount of divs on the page and use other html tags where possible but keep the original div apperance.

I have a few questions to ask -

  • Can I place a <h1>, <h2> etc inside a Div?
  • I understand I cannont place a <p> inside a <h1> or <h2>, is this correct?
  • I understand I cannot put a <ul> inside a <h1> or <h2>, is this correct?
  • I had a navigation div which housed an SSI CSS tab menu floated to the left, and a three item vertical list (ul li) floated to the right of the navigation div. I want to know if I can remove the navigation div and just use another <ul><li> as the navigation area? I cant put the SSI or vertical list in say a <h1>.
  • Finally, I can't place a Div, <ul>, <li> or <h1>etc inside a <p>, is this correct?

http://www.tomkilbourn.com/newsite/test/test.shtml

Tom

3
Contributors
4
Replies
5
Views
9 Years
Discussion Span
Last Post by MidiMagic
0

Can I place a <h1>, <h2> etc inside a Div?

answer: yes

I understand I cannont place a <p> inside a <h1> or <h2>, is this correct?

answer: correct. it is not valid html4.01

I understand I cannot put a <ul> inside a <h1> or <h2>, is this correct?

answer:correct ^ as above

I had a navigation div which housed an SSI CSS tab menu floated to the left, and a three item vertical list (ul li) floated to the right of the navigation div. I want to know if I can remove the navigation div and just use another <ul><li> as the navigation area? I cant put the SSI or vertical list in say a <h1>

answer: you should be able to use ul to suit your needs.

Finally, I can't place a Div, <ul>, <li> or <h1>etc inside a <p>, is this correct?

answer: correct not valid html

divs are not that bad interms of coding practice. it simply depends whether they are positioned absolutely. as this is a bad coding practice

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.