Skip to content

Instantly share code, notes, and snippets.

@highercomve
Last active August 29, 2015 14:03
Show Gist options
  • Save highercomve/f59e6726015e08084c01 to your computer and use it in GitHub Desktop.
Save highercomve/f59e6726015e08084c01 to your computer and use it in GitHub Desktop.
Clase 2 de HTML/CSS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Etiquetas de Estructura basicas</title>
<link rel="stylesheet" href="css/estructura.css">
</head>
<body>
<header>
<div class="container">
<h1>CSS Zen Garden</h1>
<h2>The Beauty of CSS Design</h2>
<p>A demonstration of what can be accomplished through CSS-based design. Select any style sheet from the list to load it into this page.</p>
<p>Download the example <a href="#">html file</a> and <a href="#">css file</a>
</p>
</div>
</header>
<!-- section#primera -->
<section id="primera">
<div class="container">
<header>
<h3>The Road to Enlightenment</h3>
</header>
<p>Littering a dark and dreary road lay the past relics of browser-specific tags, incompatible DOMs, broken CSS support, and abandoned browsers.</p>
<p>We must clear the mind of the past. Web enlightenment has been achieved thanks to the tireless efforts of folk like the W3C, WaSP, and the major browser creators.</p>
<p>The CSS Zen Garden invites you to relax and meditate on the important lessons of the masters. Begin to see with clarity. Learn to use the time-honored techniques in new and invigorating fashion. Become one with the web.</p>
</div>
</section>
<section id="segunda">
<div class="container">
<header>
<h3>So What is This About?</h3>
</header>
<p>There is a continuing need to show the power of CSS. The Zen Garden aims to excite, inspire, and encourage participation. To begin, view some of the existing designs in the list. Clicking on any one will load the style sheet into this very page. The HTML remains the same, the only thing that has changed is the external CSS file. Yes, really.</p>
<p>CSS allows complete and total control over the style of a hypertext document. The only way this can be illustrated in a way that gets people excited is by demonstrating what it can truly be, once the reins are placed in the hands of those able to create beauty from structure. Designers and coders alike have contributed to the beauty of the web; we can always push it further.</p>
</div>
</section>
<section id="tercera">
<div class="container">
<header>
<h3>Participation</h3>
</header>
<p>Strong visual design has always been our focus. You are modifying this page, so strong CSS skills are necessary too, but the example files are commented well enough that even CSS novices can use them as starting points. Please see the CSS Resource Guide for advanced tutorials and tips on working with CSS.</p>
<p>You may modify the style sheet in any way you wish, but not the HTML. This may seem daunting at first if you’ve never worked this way before, but follow the listed links to learn more, and use the sample files as a guide.</p>
<p>Download the sample HTML and CSS to work on a copy locally. Once you have completed your masterpiece (and please, don’t submit half-finished work) upload your CSS file to a web server under your control. Send us a link to an archive of that file and all associated assets, and if we choose to use it we will download it and place it on our server.</p>
</div>
</section>
<section id="cuarta">
<div class="container">
<header>
<h3>Requirements</h3>
</header>
<p>Where possible, we would like to see mostly CSS 1 & 2 usage. CSS 3 & 4 should be limited to widely-supported elements only, or strong fallbacks should be provided. The CSS Zen Garden is about functional, practical CSS and not the latest bleeding-edge tricks viewable by 2% of the browsing public. The only real requirement we have is that your CSS validates.</p>
<p>Luckily, designing this way shows how well various browsers have implemented CSS by now. When sticking to the guidelines you should see fairly consistent results across most modern browsers. Due to the sheer number of user agents on the web these days — especially when you factor in mobile — pixel-perfect layouts may not be possible across every platform. That’s okay, but do test in as many as you can. Your design should work in at least IE9+ and the latest Chrome, Firefox, iOS and Android browsers (run by over 90% of the population).</p>
<p>We ask that you submit original artwork. Please respect copyright laws. Please keep objectionable material to a minimum, and try to incorporate unique and interesting visual themes to your work. We’re well past the point of needing another garden-related design.</p>
<p>This is a learning exercise as well as a demonstration. You retain full copyright on your graphics (with limited exceptions, see submission guidelines), but we ask you release your CSS under a Creative Commons license identical to the one on this site so that others may learn from your work.</p>
<footer>
<p>By <a href="#">Dave Shea</a>. Bandwidth graciously donated by mediatemple. Now available: Zen Garden, the book.</p>
<p>
<a href="#">HTML</a>
<a href="#">CSS</a>
<a href="#">CC</a>
<a href="#">A11y</a>
<a href="#">GH</a>
</p>
</footer>
</div>
</section>
<section id="quinta">
<div class="container">
<article>
<header>
<h5>Select a Design:</h5>
</header>
<nav role="navigation">
<ul>
<li><a href="#">Mid Century Modern</a> by <a href="#">Andrew Lohman</a>
</li>
<li><a href="#">Garments</a> by <a href="#"> Dan Mall</a>
</li>
<li><a href="#">Steel</a> by <a href="#">Steffen Knoeller</a>
</li>
<li><a href="#">Apothecary</a> by <a href="#">Trent Walton</a>
</li>
<li><a href="#">Screen Filler</a> by <a href="#"> Elliot Jay Stocks</a>
</li>
<li><a href="#">Fountain Kiss</a> by <a href="#"> Jeremy Carlson</a>
</li>
<li><a href="#">A Robot Named Jimmy</a> by <a href="#">meltmedia</a>
</li>
<li><a href="#">Verde Moderna</a> by <a href="#"> Dave Shea</a>
</li>
</ul>
</nav>
</article>
<article>
<header>
<h5>Archives:</h5>
</header>
<nav role="navigation">
<ul>
<li class="next">
<a href="#">Next Designs <span class="indicator">›</span></a>
</li>
<li class="viewall">
<a href="#">View All Designs</a>
</li>
</ul>
</nav>
</article>
<article>
<header>
<h5>View This Design’s CSS</h5>
</header>
<ul>
<li>
<a href="#" title="View the source CSS file of the currently-viewed design.">
View This Design’s <abbr title="Cascading Style Sheets">CSS</abbr>
</a>
</li>
<li>
<a href="#" title="Links to great sites with information on using CSS.">
<abbr title="Cascading Style Sheets">CSS</abbr> Resources</a>
</li>
<li>
<a href="#" title="A list of Frequently Asked Questions about the Zen Garden.">
<abbr title="Frequently Asked Questions">FAQ</abbr>
</a>
</li>
<li>
<a href="#" title="Send in your own CSS file.">
Submit a Design
</a>
</li>
<li>
<a href="#" title="View translated versions of this page.">
Translations
</a>
</li>
</ul>
</article>
</div>
</section>
<footer>
<div class="container">
<h6>Sitio web realizado por Sergio Marin</h6>
</div>
</footer>
</body>
</html>
/*
Regla CSS
selector1 {
propiedad: valor;
propiedad: valor;
propiedad: valor;
propiedad: valor;
font-family: Arial;
}
selector2 {
propiedad: valor;
propiedad: valor;
propiedad: valor;
propiedad: valor;
}
*/
/*
Selector de Etiqueta
El selector de etiqueta, se encarga de darle estilos
a todos los elementos de una misma etique, su sintaxis
es la siguiente
tag {
}
Ejemplos:
*/
body {
padding: 0; /* Relleno del elemento*/
margin: 0; /* Margen del elemento*/
}
h1 {
font-family: sans-serif;
color: #3c90ce; /* Color de la fuente */
background-color: #e5baba; /* Color del Fondo */
}
a {
background-color: #000;
color: white;
}
header {
background-color: #3dbf8a;
padding: 20px;
}
/*
Selector de elementos por su attributo de clase
El selector de clase, seleccionar todos los elementos
HTML que esten identificados con el attributo "class"
con un nombre en espefico. Lo que permite seleccionar
multiples elementos con el mismo "nombre" de familia
(clase)
Ejemplo:
<div class="container"> </div>
*/
.container {
max-width: 940px; /* Ancho minimo del Elemento */
/* Centrado de un elemento de estructura */
margin-right: auto;
margin-left: auto;
}
/*
Selector por atributo ID
El selector de ID, seleccionar un elemento
HTML que este identificado con el attributo "id"
con un nombre en espefico. Lo que permite seleccionar
un unico elemento con un "nombre" unico (ID)
Ejemplo:
<section id="primera"> </div>
*/
#primera {
background-color: #83456b;
/*
El borde se describe con 3 valores
Ancho del borde
Color del borde
Tipo de Borde, entre los tipos de borde se encuentra:
solid (Borde de linea continua)
double (Borde de doble linea continua)
dotted (Linea punteada)
dashed (Linea discontinua)
Ejemplo:
*/
border: 10px #000 solid; /* Borde del elemento */
padding: 20px;
}
#segunda {
background-color: #c4c410;
padding: 20px;
}
#tercera {
background-color: #b2860f;
padding: 20px;
}
/*
Los selectores permiten seleccionar uno o mas elementos
para darle estilo por medio de propiedades CSS
En caso de necesitar seleccionar varios elementos de
manera simultanea se puede usar un selector multiple
El cual selecciona al mismo tiempo varios selectores.
Cada selector esta separado del siguiente con una coma
y el ultimo selector no dispondra de la coma al final.
selector1, selector2, selector3 {
}
Ejemplo:
En caso que necesitemos seleccionar todos las etiquetas
de titulacion o headlines, usariamos el siguiente selector:
*/
h1, h2, h3, h4, h5, h6 {
font-style: italic;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment