my dog learned polymorphism*
The moose likes JSP and the fly likes table, tr, td, th in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "table, tr, td, th in JSP" Watch "table, tr, td, th in JSP" New topic
Author

table, tr, td, th in JSP

Jane Somerfield
Ranch Hand

Joined: Jul 20, 2002
Posts: 193
I'm new to JSP and HTML.
I saw many <tr>, <td>, <th> tags are not embeded in
<table> tag in JSP. Is it legal in HTML? Can
we use it in JSP? Why? Thanks.
[ November 18, 2002: Message edited by: Jane Smith ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60738
    
  65

No and no.
Firstly, the table row, table data and other table construction tags are not "legal" outside of the table tag (whether some browsers are lenient about it or not is another question).
With regards to JSP, remember that the sole purpose of JSP is to format text to send to the browser, so if you are using your JSP to create HTML, then whatever gets generated IS HTML and must follow the same rules.
hth,
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: table, tr, td, th in JSP
 
Similar Threads
Information lost on error.
how to display output in the same page of imput
HTML Table Column Widths
jQuery doubt with reference to Object Literal Example.
HTML table