33 |
34 |
35 | ## Instalación en un clic (recomendado)
36 |
37 | Puedes empezar estos ejercicios en pocos segundos haciendo clic en: [Abrir en Codespaces](https://codespaces.new/?repo=4GeeksAcademy/html-forms-tutorial-exercises) (recomendado) o [Abrir en Gitpod](https://gitpod.io#https://github.com/4GeeksAcademy/html-forms-tutorial-exercises.git).
38 |
39 | > Una vez ya tengas abierto VSCode, los ejercicios de LearnPack deberían empezar automáticamente, si esto no sucede puedes intentar empezar los ejercicios escribiendo este comando en tu terminal: `$ learnpack start`
40 |
41 | ## Instalación local:
42 |
43 | Clona el repositorio en tu ambiente local y sigue los siguientes pasos:
44 |
45 | 1. Instala LearnPack, el package manager para tutoriales de aprendizaje y el HTML compiler plugin para LearnPack, asegúrate también de tener node.js 14+:
46 |
47 | ```bash
48 | $ npm i @learnpack/learnpack -g
49 | ```
50 |
51 | 2. Descarga estos ejercicios en particular usando LearnPack y luego `cd` para entrar en la carpeta:
52 |
53 | ```bash
54 | $ git clone https://github.com/4GeeksAcademy/html-forms-tutorial-exercises
55 | $ cd html-forms-tutorial-exercises
56 | ```
57 |
58 | > Nota: Una vez que termines de descargar, encontrarás una carpeta "exercises" que contiene todos los ejercicios.
59 |
60 | 3. Inicializa el tutorial/ejercicios ejecutando el siguiente comando en el mismo nivel donde se encuentra tu archivo learn.json:
61 |
62 | ```bash
63 | $ learnpack start
64 | ```
65 |
66 |
67 | ## ¿Cómo están organizados los ejercicios?
68 |
69 | Cada ejercicio es una pequeña aplicación de React que contiene los siguientes archivos:
70 |
71 | 1. **index.js:** representa el archivo de entrada para toda la aplicación.
72 | 2. **README.md:** contiene las instrucciones de los ejercicios.
73 | 3. **test.js:** no tienes que abrir este archivo, contiene el script del test para el ejercicio.
74 |
75 | > Nota: Los ejercicios son autograduados, pero los tests son muy rígidos y estrictos, mi recomendación es que no prestes demasiada atención a los tests y los uses solo como una sugerencia o podrías frustrarte.
76 |
77 | ## Colaboradores
78 |
79 | Gracias a estas personas maravillosas ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
80 |
81 | 1. [Alejandro Sanchez (alesanchezr)](https://github.com/alesanchezr), contribución: (codificador) 💻 (idea) 🤔, (build-tests) ⚠️ , (pull-request-review) 🤓 (tutorial de compilación) ✅ (documentación) 📖
82 |
83 | Este proyecto sigue la especificación [all-contributors](https://github.com/kentcdodds/all-contributors). ¡Todas las contribuciones son bienvenidas!
84 |
85 | Este y otros ejercicios son usados para [aprender a programar](https://4geeksacademy.com/es/aprender-a-programar/aprender-a-programar-desde-cero) por parte de los alumnos de 4Geeks Academy [Coding Bootcamp](https://4geeksacademy.com/us/coding-bootcamp) realizado por [Alejandro Sánchez](https://twitter.com/alesanchezr) y muchos otros contribuyentes. Conoce más sobre nuestros [Cursos de Programación](https://4geeksacademy.com/es/curso-de-programacion-desde-cero?lang=es) para convertirte en [Full Stack Developer](https://4geeksacademy.com/es/coding-bootcamps/desarrollador-full-stack/?lang=es), o nuestro [Data Science Bootcamp](https://4geeksacademy.com/es/coding-bootcamps/curso-datascience-machine-learning).
86 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | # HTML5 Forms Tutorial & Exercises
3 |
4 |
5 | > By [@alesanchezr](https://twitter.com/alesanchezr) and [other contributors](https://github.com/4GeeksAcademy/html-forms-tutorial-exercises/graphs/contributors) at [4Geeks Academy](https://4geeksacademy.co/)
6 |
7 | 
8 | [](https://breatheco.de)
9 | [](https://twitter.com/4geeksacademy)
10 |
11 | > *Estas instrucciones [están disponibles en 🇪🇸 español](https://github.com/4GeeksAcademy/html-forms-tutorial-exercises/blob/master/README.es.md) :es:*
12 |
13 |
14 |
15 | Forms are so important in the world of HTML, CSS and Javascript that I decided to give them a special course to focus in all the inputs, buttons and elements that HTML brings by default to focus on interaction. During these exercises you will learn the following:
16 |
17 | 1. How to use text inputs, text areas, date inputs and numeric inputs.
18 |
19 | 2. How to use dropdowns.
20 |
21 | 3. How to form preventive validations.
22 |
23 | 4. The difference between GET and POST.
24 |
25 | 5. Styling a form.
26 |
27 |
28 | #### Before we start... other related tutorials
29 |
30 |
31 |
36 |
37 |
38 | ## One click installation (recommended):
39 |
40 | You can open these exercises in just a few seconds by clicking: [Open in Codespaces](https://codespaces.new/?repo=4GeeksAcademy/html-forms-tutorial-exercises) (recommended) or [Open in Gitpod](https://gitpod.io#https://github.com/4GeeksAcademy/html-forms-tutorial-exercises.git).
41 |
42 | > Once you have VSCode open the LearnPack exercises should start automatically. If exercises don't run automatically you can try typing on your terminal: `$ learnpack start`
43 |
44 | ## Local installation
45 |
46 | Clone the repository in your local environment and follow the steps below:
47 |
48 | 1. Install LearnPack, the package manager for learning tutorials and the HTML compiler plugin for LearnPack, make sure you also have node.js 14+:
49 |
50 | ```bash
51 | $ npm i @learnpack/learnpack -g
52 | ```
53 |
54 | 2. Download these particular exercises using LearnPack and `cd` into the folder:
55 |
56 | ```bash
57 | $ git clone https://github.com/4GeeksAcademy/html-forms-tutorial-exercises
58 | $ cd html-forms-tutorial-exercises
59 | ```
60 |
61 | > Note: Once you finish downloading, you will find an "exercises" folder that contains all the exercises within.
62 |
63 | 3. Start the tutorial/exercises by running the following command at the same level where your learn.json file is:
64 |
65 | ```bash
66 | $ learnpack start
67 | ```
68 |
69 |
70 | ## How are the exercises organized?
71 |
72 | Each exercise is a small React application containing the following files:
73 |
74 | 1. **index.html:** represents the entry file for the entire exercise.
75 | 2. **README.md:** contains exercise instructions.
76 | 3. **test.js:** you don't have to open this file, it contains the testing script for the exercise.
77 |
78 | > Note: The exercises have automatic grading, but it's very rigid and strict, my recommendation is to not take the tests too serious and use them only as a suggestion, or you may get frustrated.
79 |
80 | ## Contributors
81 |
82 | Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
83 |
84 | 1. [Alejandro Sanchez (alesanchezr)](https://github.com/alesanchezr), contribution: (coder) 💻 (idea) 🤔, (build-tests) ⚠️ , (pull-request-review) 🤓
85 | (build-tutorial) ✅ (documentation) 📖
86 |
87 | This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind are welcome!
88 |
89 | This and many other exercises are built by students as part of the 4Geeks Academy [Coding Bootcamp](https://4geeksacademy.com/us/coding-bootcamp) by [Alejandro Sánchez](https://twitter.com/alesanchezr) and many other contributors. Find out more about our [Full Stack Developer Course](https://4geeksacademy.com/us/coding-bootcamps/part-time-full-stack-developer), and [Data Science Bootcamp](https://4geeksacademy.com/us/coding-bootcamps/datascience-machine-learning).
90 |
--------------------------------------------------------------------------------
/exercises/01-welcome/README.es.md:
--------------------------------------------------------------------------------
1 | ---
2 | intro: "https://www.youtube.com/watch?v=tCI20Ueo6Q8"
3 | ---
4 |
5 |
6 | # `01` Bienvenido al mundo de HTML 😆 !!
7 |
8 | Hola, mi nombre es [Alejandro Sánchez](http://alesanchezr.com) y soy uno de los fundadores de @4GeeksAcademy (bootcamp de programación). Estos ejercicios y muchos otros tutoriales interactivos se han liberado al público a través del [Sitio web de 4Geeks](https://4geeks.com).
9 |
10 | Estos ejercicios son para cualquier persona interesada en dominar los formularios HTML. Vamos a abordar los siguientes conceptos:
11 |
12 | 1. Uso de entradas/inputs de texto, text areas, entradas/inputs de fecha y entradas/inputs numéricas
13 |
14 | 2. Uso de dropdowns
15 |
16 | 3. Validaciones de formulario
17 |
18 | 4. Dar estilos a un formulario
19 |
20 | ## ➡️ Incremental & ✔️ Autoevaluado
21 |
22 | - He construido los ejercicios de forma gradual, deberías sentir el progreso poco a poco, y con suerte, el incremento de dificultad entre cada ejercicio nunca será demasiado grande para frustrarte.
23 |
24 | - Todos los ejercicios han sido calificados automáticamente gracias a [@haydavid23](https://github.com/haydavid23)
25 |
26 | Presiona `Next ->` en la parte superior de estas instrucciones para comenzar con el primer ejercicio.
27 |
--------------------------------------------------------------------------------
/exercises/01-welcome/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | intro: "https://www.youtube.com/watch?v=83HxtkBq7Yc"
3 | ---
4 |
5 |
6 | # `01` Welcome to the world of HTML 😆 !!
7 |
8 | Hello, my name is [Alejandro Sánchez](http://alesanchezr.com), and I'm one of the founders of @4GeeksAcademy. These exercises and many other interactive tutorials have been open sourced and released through the [4Geeks Website](https://4geeks.com).
9 |
10 | These exercises are for anyone interested in mastering HTML Forms, we will go over the following concepts:
11 |
12 | 1. Using text inputs, text areas, date inputs and numeric inputs
13 |
14 | 2. Using dropdowns
15 |
16 | 3. Form preventive validations
17 |
18 | 4. Styling a form
19 |
20 | ## ➡️ Incremental & ✔️ Autograded
21 |
22 | - I've built the exercises incrementally, you should feel the progress little by little, and hopefully, the difficulty raising between exercises will never be too big to get you frustrated.
23 |
24 | - All exercises have been automatically graded thanks to [@haydavid23](https://github.com/haydavid23)
25 |
26 | Click the `Next ->` button on the top of these instructions to begin with the first exercise.
27 |
--------------------------------------------------------------------------------
/exercises/02-hello-world/README.es.md:
--------------------------------------------------------------------------------
1 | ---
2 | tutorial: "https://www.youtube.com/watch?v=cST3349NjPg"
3 | ---
4 |
5 | # `02` Hello World
6 |
7 | ## 📝 Instrucciones:
8 |
9 | 1. Añade la estructura básica de HTML para cualquier sitio web (doctype, html, head y body).
10 |
11 | 2. Añade "Hello World" dentro de la etiqueta del título `` de la página web.
12 |
13 | ## 💡 Pista:
14 |
15 | + Puedes leer sobre la estructura típica de un sitio web aquí:
16 |
17 | https://4geeks.com/es/lesson/what-is-html-learn-html-es#estructura-de-pgina
18 |
19 | ## 📎 Nota:
20 |
21 | + El título aparecerá en el contenido de la página web, se mostrará en la pestaña del navegador.
22 |
--------------------------------------------------------------------------------
/exercises/02-hello-world/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | tutorial: "https://www.youtube.com/watch?v=ytIzazz6q5Y"
3 | ---
4 |
5 | # `02` Hello World
6 |
7 | ## 📝 Instructions:
8 |
9 | 1. Add the basic HTML structure for any website (doctype, html, head and body)
10 |
11 | 2. Add "Hello World" inside the `` tag of the website.
12 |
13 | ## 💡 Hint:
14 |
15 | + You can read about a typical website structure here:
16 |
17 | https://4geeks.com/lesson/what-is-html-learn-html#page-structure
18 |
19 | ## 📎 Note:
20 |
21 | + The title is not going to show on the content of the website, it will show on the browser tab.
22 |
--------------------------------------------------------------------------------
/exercises/02-hello-world/index.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/exercises/02-hello-world/solution.hide.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Hello World
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/exercises/02-hello-world/tests.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs');
2 | const path = require('path');
3 | const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8');
4 |
5 | jest.dontMock('fs');
6 |
7 | describe('basic HTML structure', function () {
8 | beforeEach(() => { document.documentElement.innerHTML = html.toString(); });
9 | afterEach(() => { jest.resetModules(); });
10 |
11 | it('Correct order of HTML tags', function () {
12 | let a = document.documentElement.innerHTML = html.toString()
13 | let b = a.indexOf("")
14 | let c = a.indexOf("")
16 | let e = a.indexOf("")
17 | let f = a.indexOf("")
18 |
19 | //here we check for the order of the tags
20 | expect(b).toBeLessThan(c)
21 | expect(c).toBeLessThan(d)
22 | expect(d).toBeLessThan(e)
23 | expect(e).toBeLessThan(f)
24 |
25 | })
26 |
27 | it(' tag should exist', function () {
28 | let a = document.documentElement.innerHTML = html.toString()
29 | expect(a.indexOf("")).not.toBe(-1)
30 | })
31 | it(' tag should exist', function () {
32 | let a = document.documentElement.innerHTML = html.toString()
33 | expect(a.indexOf(" tag should exist', function () {
36 | let a = document.documentElement.innerHTML = html.toString()
37 | expect(a.indexOf("")).not.toBe(-1)
38 | })
39 | it(' tag exists and the innerHTML should be "Hello World"', function () {
40 | let a = document.documentElement.innerHTML = html.toString()
41 | expect(a.indexOf("")).not.toBe(-1)
42 | expect(document.querySelector("title").innerHTML).toBe("Hello World")
43 | })
44 | it(' tag exists', function () {
45 | let a = document.documentElement.innerHTML = html.toString()
46 | expect(a.indexOf("` y `