• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

div tag as html container

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it ok to have html as a child element of div tag. For example...

div
html
....
/html
/div

Please respond asap.

Thanks a lot.
NJ
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
html tags should not be surrounded by div tags

What are you trying to do?

You can validate a page and see what is wrong here: http://www.w3schools.com/site/site_validate.asp

Eric
 
Jain Neeraj
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the quik response.
The scenario is- I'm having a JSP with few divs in it. The contents of the divs are to be html files generated seperately.
It's going to be something like
div
(a variable that will get the html file contents here) //line 1
/div

Now this html file contents as line 1 is a html file with html and other tags, that becomes the child of div tag.

So i want to make sure if it is correct, or there shud be some other approach to do so.

Thanks,
NJ
 
Ranch Hand
Posts: 464
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You dont need to surround with html and body tags if you are only including content. Just create the content.

If you want to inline a full html page look at iframes.
 
I'm so happy! And I wish to make this tiny ad happy too:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic