Merge branch 'main' of https://git.marklogo.duckdns.org/marklogo/IFCD0210
This commit is contained in:
commit
ef742d2240
46
Practicas/Practicas JS/Introduccion/estilos.css
Normal file
46
Practicas/Practicas JS/Introduccion/estilos.css
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');
|
||||||
|
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: 'Poppins', sans-serif;
|
||||||
|
min-height: 100vh;
|
||||||
|
width: 100%;
|
||||||
|
background: #eaeaea;
|
||||||
|
color: #000;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 40px;
|
||||||
|
font-weight: normal;
|
||||||
|
margin-bottom: 40px;
|
||||||
|
color: #848484;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
border: none;
|
||||||
|
background: #2553df;
|
||||||
|
font-family: 'Poppins', sans-serif;
|
||||||
|
font-size: 22px;
|
||||||
|
cursor: pointer;
|
||||||
|
border-radius: 10px;
|
||||||
|
color: #fff;
|
||||||
|
padding: 14px 28px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover {
|
||||||
|
background: #1942be;
|
||||||
|
}
|
||||||
40
Practicas/Practicas JS/Introduccion/holaMundo.html
Normal file
40
Practicas/Practicas JS/Introduccion/holaMundo.html
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<link rel="stylesheet" href="./estilos.css" />
|
||||||
|
<title>Mi primera página web con Javascript</title>
|
||||||
|
<!-- Forma #2 - Etiqueta Script en Head -->
|
||||||
|
<script defer>
|
||||||
|
alert('Se ejecuta desde el head');
|
||||||
|
//defer es carga diferida para que se cargue primero la página y despues el javascript
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Forma #3 - Archivo externo -->
|
||||||
|
<script defer src="holaMundo.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Hola Mundo!</h1>
|
||||||
|
<!-- Forma #1 - Etiqueta Script -->
|
||||||
|
<script>
|
||||||
|
// Notas importantes:
|
||||||
|
// - Javascript es sensible a mayusculas y minisculas.
|
||||||
|
// - Respetar la sintaxis de tipo camel case. getElementById
|
||||||
|
// - Punto y coma al final de cada sentencia.
|
||||||
|
|
||||||
|
// Comentarios de tipo linea
|
||||||
|
/*
|
||||||
|
Comentarios de varias lineas
|
||||||
|
(tipo bloque)
|
||||||
|
*/
|
||||||
|
// El codigo comentado no se ejecuta
|
||||||
|
// alert('Este codigo no se ejecuta');
|
||||||
|
|
||||||
|
document.write('<h2>Hola Mundo!</h2>');
|
||||||
|
alert('Hola soy una alerta!');
|
||||||
|
console.log('Hola desde la consola');
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
1
Practicas/Practicas JS/Introduccion/holaMundo.js
Normal file
1
Practicas/Practicas JS/Introduccion/holaMundo.js
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
alert('Hola mundo, desde archivo externo');
|
||||||
Loading…
Reference in New Issue
Block a user