Search code examples
html-tablespaceparagraph

How to reduce space between table and paragraph in HTML?


I am using HTML table followed by paragraph but I found space between the table and paragraph is more than needed. How can I control (reduce) the space between table and paragraph.

<table border=1><tr><td>col1</td><td>col2</td></tr></table>
<p style="width: 100%; text-align: right;"><button type="button" id="submit-button" style='visibility:hidden;width:1px;height:1px' >Submit</button></p>

Solution

  • Margin-top:0%

    <table border=1><tr><td>col1</td><td>col2</td></tr></table>
    <p style=" margin-top:0%;width: 100%; text-align: right;"><button type="button" id="submit-button" style='visibility:hidden;width:1px;height:1px' >Submit</button></p>