{"id":163,"date":"2024-05-21T09:07:41","date_gmt":"2024-05-21T07:07:41","guid":{"rendered":"https:\/\/blog.sutilweb.eu\/?page_id=163"},"modified":"2024-05-21T09:07:42","modified_gmt":"2024-05-21T07:07:42","slug":"27-relleno-y-espaciado-de-tablas","status":"publish","type":"page","link":"https:\/\/sutilweb.eu\/index.php\/lenguajes\/html5\/html5-manual\/27-relleno-y-espaciado-de-tablas\/","title":{"rendered":"27. Relleno y espaciado de tablas"},"content":{"rendered":"\n<p>Las tablas HTML pueden ajustar el relleno dentro de las celdas y tambi\u00e9n el espacio entre las celdas.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Relleno de celdas<\/h2>\n\n\n\n<p>El <strong>relleno de celda<\/strong> es el espacio entre los bordes de la celda y el contenido de la celda. De forma predeterminada, el relleno se establece en 0. Para agregar <strong>relleno<\/strong> en las celdas de la tabla, usa la propiedad CSS <strong><em>padding<\/em><\/strong>.<\/p>\n\n\n\n<p><strong>Ejm<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">th, td {\n&nbsp;&nbsp;padding: 15px;\n}<\/pre>\n\n\n\n<p>Para agregar <strong>relleno<\/strong> solo sobre el contenido, usa la propiedad <strong><em>padding-top<\/em><\/strong>. Y los otros lados con las propiedades <strong><em>padding-bottom<\/em><\/strong>, <strong><em>padding-left<\/em><\/strong> y <strong><em>padding-right<\/em><\/strong>.<\/p>\n\n\n\n<p><strong>Ejm<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">th, td {\n&nbsp;&nbsp;padding-top: 10px;\n&nbsp;&nbsp;padding-bottom: 20px;\n&nbsp;&nbsp;padding-left: 30px;\n&nbsp;&nbsp;padding-right: 40px;\n}<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Tabla HTML &#8211; Espaciado de celdas<\/h2>\n\n\n\n<p>El espacio entre celdas es el espacio entre cada celda. De forma predeterminada, el espacio se establece en 2 p\u00edxeles. Para cambiar el espacio entre las celdas de la tabla, usa la propiedad <strong><em>border-spacing<\/em><\/strong> de CSS en el elemento <strong><em>table<\/em><\/strong>.<\/p>\n\n\n\n<p><strong>Ejm<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">table {\n&nbsp;&nbsp;border-spacing: 30px;\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Las tablas HTML pueden ajustar el relleno dentro de las celdas y tambi\u00e9n el espacio entre las celdas.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":41,"menu_order":26,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-163","page","type-page","status-publish","hentry"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Sutil Web","author_link":"https:\/\/sutilweb.eu\/index.php\/author\/sutilweb\/"},"uagb_comment_info":0,"uagb_excerpt":"Las tablas HTML pueden ajustar el relleno dentro de las celdas y tambi\u00e9n el espacio entre las celdas.","_links":{"self":[{"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/pages\/163","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/comments?post=163"}],"version-history":[{"count":2,"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/pages\/163\/revisions"}],"predecessor-version":[{"id":165,"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/pages\/163\/revisions\/165"}],"up":[{"embeddable":true,"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/pages\/41"}],"wp:attachment":[{"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/media?parent=163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}