{"id":211,"date":"2024-05-21T09:50:03","date_gmt":"2024-05-21T07:50:03","guid":{"rendered":"https:\/\/blog.sutilweb.eu\/?page_id=211"},"modified":"2024-05-21T09:50:04","modified_gmt":"2024-05-21T07:50:04","slug":"42-elementos-y-tecnicas-de-diseno-en-html","status":"publish","type":"page","link":"https:\/\/sutilweb.eu\/index.php\/lenguajes\/html5\/html5-manual\/42-elementos-y-tecnicas-de-diseno-en-html\/","title":{"rendered":"42. Elementos y t\u00e9cnicas de dise\u00f1o en HTML"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Los sitios web a menudo muestran contenido en varias columnas (como una revista o un peri\u00f3dico).<\/p>\n\n\n\n<!--more-->\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Ejm<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"948\" height=\"521\" src=\"https:\/\/blog.sutilweb.eu\/wp-content\/uploads\/2024\/05\/Elementos-y-tecnicas-de-diseno-en-HTML.png\" alt=\"\" class=\"wp-image-213\" srcset=\"https:\/\/sutilweb.eu\/wp-content\/uploads\/2024\/05\/Elementos-y-tecnicas-de-diseno-en-HTML.png 948w, https:\/\/sutilweb.eu\/wp-content\/uploads\/2024\/05\/Elementos-y-tecnicas-de-diseno-en-HTML-300x165.png 300w, https:\/\/sutilweb.eu\/wp-content\/uploads\/2024\/05\/Elementos-y-tecnicas-de-diseno-en-HTML-768x422.png 768w\" sizes=\"auto, (max-width: 948px) 100vw, 948px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Elementos de dise\u00f1o HTML<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">HTML tiene varios elementos sem\u00e1nticos que definen las diferentes partes de una p\u00e1gina web:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/sutilweb.com\/wp-content\/uploads\/2022\/02\/Captura-de-pantalla-2022-02-26-a-las-10.48.04.png\" alt=\"\" class=\"wp-image-8635\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><em>&lt;header><\/em><\/strong>: define la cabecera para un documento o secci\u00f3n<\/li>\n\n\n\n<li><strong><em>&lt;nav><\/em><\/strong>: define un set de enlaces de navegaci\u00f3n<\/li>\n\n\n\n<li><strong><em>&lt;section><\/em><\/strong>: define una secci\u00f3n en un documento<\/li>\n\n\n\n<li><strong><em>&lt;article><\/em><\/strong>: define un contenido independiente y aut\u00f3nomo<\/li>\n\n\n\n<li><strong><em>&lt;aside><\/em><\/strong>: define contenido aparte del contenido (como una barra lateral)<\/li>\n\n\n\n<li><strong><em>&lt;footer><\/em><\/strong>: define un pie para un documento o secci\u00f3n<\/li>\n\n\n\n<li><strong><em>&lt;details><\/em><\/strong>: define detalles adicionales que el usuario puede abrir y cerrar a pedido<\/li>\n\n\n\n<li><strong><em>&lt;summary><\/em><\/strong>: Define un encabezado para el elemento <strong><em>&lt;details><\/em><\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Ejm<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n&lt;head&gt;\n&lt;title&gt;CSS Template&lt;\/title&gt;\n&lt;meta charset=\"utf-8\"&gt;\n&lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"&gt;\n&lt;style&gt;\n* {\nbox-sizing: border-box;\n}\n\nbody {\nfont-family: Arial, Helvetica, sans-serif;\n}\n\n\/* Style the header *\/\nheader {\nbackground-color: #666;\npadding: 30px;\ntext-align: center;\nfont-size: 35px;\ncolor: white;\n}\n\n\/* Create two columns\/boxes that floats next to each other *\/\nnav {\nfloat: left;\nwidth: 30%;\nheight: 300px; \/* only for demonstration, should be removed *\/\nbackground: #ccc;\npadding: 20px;\n}\n\n\/* Style the list inside the menu *\/\nnav ul {\nlist-style-type: none;\npadding: 0;\n}\n\narticle {\nfloat: left;\npadding: 20px;\nwidth: 70%;\nbackground-color: #f1f1f1;\nheight: 300px; \/* only for demonstration, should be removed *\/\n}\n\n\/* Clear floats after the columns *\/\nsection::after {\ncontent: \"\";\ndisplay: table;\nclear: both;\n}\n\n\/* Style the footer *\/\nfooter {\nbackground-color: #777;\npadding: 10px;\ntext-align: center;\ncolor: white;\n}\n\n\/* Responsive layout - makes the two columns\/boxes stack\n on top of each other instead of next to each other, on small screens *\/\n@media (max-width: 600px) {\nnav, article {\nwidth: 100%;\nheight: auto;\n}\n}\n&lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n\n&lt;h2&gt;CSS Layout Float&lt;\/h2&gt;\n&lt;p&gt;In this example, we have created a header, two columns\/boxes and a footer.\n On smaller screens, the columns will stack on top of each other.&lt;\/p&gt;\n&lt;p&gt;Resize the browser window to see the responsive effect \n(you will learn more about this in our next chapter - HTML Responsive.)&lt;\/p&gt;\n\n&lt;header&gt;\n&lt;h2&gt;Cities&lt;\/h2&gt;\n&lt;\/header&gt;\n\n&lt;section&gt;\n&lt;nav&gt;\n&lt;ul&gt;\n&lt;li&gt;&lt;a href=\"#\"&gt;London&lt;\/a&gt;&lt;\/li&gt;\n&lt;li&gt;&lt;a href=\"#\"&gt;Paris&lt;\/a&gt;&lt;\/li&gt;\n&lt;li&gt;&lt;a href=\"#\"&gt;Tokyo&lt;\/a&gt;&lt;\/li&gt;\n&lt;\/ul&gt;\n&lt;\/nav&gt;\n\n&lt;article&gt;\n&lt;h1&gt;London&lt;\/h1&gt;\n&lt;p&gt;London is the capital city of England. It is the most populous\n city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.&lt;\/p&gt;\n&lt;p&gt;Standing on the River Thames, London has been a major settlement for two millennia,\n its history going back to its founding by the Romans, who named it Londinium.&lt;\/p&gt;\n&lt;\/article&gt;\n&lt;\/section&gt;\n\n&lt;footer&gt;\n&lt;p&gt;Footer&lt;\/p&gt;\n&lt;\/footer&gt;\n\n&lt;\/body&gt;\n&lt;\/html&gt;<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">T\u00e9cnicas de dise\u00f1o HTML<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Hay cuatro t\u00e9cnicas diferentes para crear dise\u00f1os de varias columnas. Cada t\u00e9cnica tiene sus pros y sus contras:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Frameworks CSS<\/li>\n\n\n\n<li>CSS Float Layout<\/li>\n\n\n\n<li>CSS Flexbox Layout<\/li>\n\n\n\n<li>CSS Grid Layout<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Frameworks CSS<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Si deseas crear su dise\u00f1o r\u00e1pidamente, puedes usar un <strong>marco CSS<\/strong>, como <strong>W3.CSS<\/strong> o <strong>Bootstrap<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">CSS Float Layout<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Es com\u00fan hacer dise\u00f1os web completos usando la propiedad flotante de CSS. <strong><em>Float<\/em> <\/strong>es f\u00e1cil de aprender: solo necesitas recordar c\u00f3mo funcionan las propiedades <strong><em>float<\/em> <\/strong>y <strong><em>clear<\/em><\/strong>. Desventajas: los elementos flotantes est\u00e1n vinculados al flujo de documentos, lo que puede da\u00f1ar la flexibilidad.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">CSS Flexbox Layout<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">El uso de <strong>flexbox<\/strong> garantiza que los elementos se comporten de manera predecible cuando el dise\u00f1o de la p\u00e1gina deba adaptarse a diferentes tama\u00f1os de pantalla y diferentes dispositivos de visualizaci\u00f3n.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">CSS Grid Layout<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">El m\u00f3dulo <strong>grid CSS<\/strong> ofrece un sistema de dise\u00f1o basado en cuadr\u00edculas, con filas y columnas, lo que facilita el dise\u00f1o de p\u00e1ginas web sin tener que usar <strong>floats<\/strong> y posiciones.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Los sitios web a menudo muestran contenido en varias columnas (como una revista o un peri\u00f3dico).<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":41,"menu_order":41,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","footnotes":""},"class_list":["post-211","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":"Los sitios web a menudo muestran contenido en varias columnas (como una revista o un peri\u00f3dico).","_links":{"self":[{"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/pages\/211","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=211"}],"version-history":[{"count":2,"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/pages\/211\/revisions"}],"predecessor-version":[{"id":214,"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/pages\/211\/revisions\/214"}],"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=211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}