Skip to main content
Known Participant
June 14, 2022
Answered

Cell format in new table row

  • June 14, 2022
  • 3 replies
  • 1169 views

When I create a new row in a table (control click in a cell > Table > Insert Rows or Columns) the cell is formatted by default as None. I would like cells in new rows to be formatted as Paragraph.

I have done extensive searches, but haven't found an answer.

    This topic has been closed for replies.
    Correct answer B i r n o u
    quote

    Well it may if the intended CSS styles are applied to <p> tags and not <td> tags.

    By @Nancy OShea

     

    isn't it easiest to add a , td to the p rules,

    as

    before

    p {
     /* any description */
    }

    after

    p, td {
     /* any description */
    }

    than adding a P tag deep in the butter just to get a styled content.. except as @L e n a  point at for a semantic need (Well I don't personnaly see any P semantic need in within a TD)

    3 replies

    AmySykes
    Known Participant
    June 15, 2022

    Hi Habronattus, Happy Wednesday. If you are using Tables to layout web pages you are a rockstar. Boostrap is so much easier than tables. Trust me. Here see for yourself.  https://youtu.be/kqH7ORdVzNg

    Have a happy day.

     

    Inspiring
    June 15, 2022

    I don't understand your expectations.
    by inserting a new row TR, necessarily the new cell content will be either TH, or TD... but not P
    the question is... what do you want to achieve... a visual of your TH and TD cells that is based on the visual used by your P tags?
    or do you want your cells to automatically contain paragraphs in the form of P tags... so a semantic meaning... for what interest ?

    BenPleysier
    Braniac
    June 15, 2022

    Totally agree with @L e n a , <td><p>This is a paragraph....</p></td> does not require a P-tag.

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    Nancy OShea
    Braniac
    June 15, 2022
    quote

    <td><p>This is a paragraph....</p></td> does not require a P-tag.


    By @BenPleysier

    ============

    Well it may if the intended CSS styles are applied to <p> tags and not <td> tags.

     

    Nancy O'Shea— Product User, Community Expert &amp; Moderator
    Nancy OShea
    Braniac
    June 14, 2022

    Cells are not styled as paragraphs.  Paragraphs are styled as paragraphs.

     

    By way of example:

    <table border="1" cellpadding="5">
    <tr>
    <th><h1>Heading</h1></th>
    <th><h1>Heading</h1></th>
    <th><h1>Heading</h1></th>
    </tr>

    <tr>
    <td><p>This is a paragraph....</p></td>
    <td><p>This is a paragraph....</p></td>
    <td><p>This is a paragraph....</p></td>
    </tr>
    </table>

     

    That said, Tables are for tabular data only (charts & spreadsheets).  Use CSS for webpage layouts.

     

    Nancy O'Shea— Product User, Community Expert &amp; Moderator
    Known Participant
    June 14, 2022

    These are labels and sentences within cells. What I'm referring to is the paragraph format that contains my font choice, as shown in the inspector.

    The data is (are?) tabular. The page is just a simple table with many rows. No embedded tables.

    I think in the past a new row had the correct formatting as a default, but I must have changed something.

     

    Here's an example:

    <tr style="font-family: 'Gill Sans', 'Gill Sans MT', 'Myriad Pro', 'DejaVu Sans Condensed', Helvetica, Arial, sans-serif">
    <td width="234" bgcolor="#FAF9F9"><p>Morocco </p></td>
    <td><p>1930</p></td>
    <td width="207"><p>Gary Cooper<br>
    Marlene Dietrich<br>
    Adolphe Menjou<br>
    Eve Southern<br>
    Ullrich Haupt </p>
    <p>Director:<br>
    Josef von Sternberg </p></td>
    <td><p><img src="picsdate/morocco.jpg" width="240" height="205" alt=""/></p></td>
    <td><p>Madame Caesar, (Eve Southern), blah, blah.<br>
    Several other shots in this set show Thonet No. 18s.</p></td>
    </tr>

     

    I'm aware that, with a lot of work, I could recreate the table with CSS.

    Nancy OShea
    Braniac
    June 14, 2022

    Using inline styles in HTML code is confusing and easy to break styles.  It would be better if styles were kept in a separate stylesheet.  The only time we use inline styles is when creating emails.

     

    I would use definition lists for this.

    https://www.the-art-of-web.com/css/format-dl/

     

    Nancy O'Shea— Product User, Community Expert &amp; Moderator