Skip to content

Instantly share code, notes, and snippets.

View JosueMagnus12's full-sized avatar
💻
Working on cool stuff

Josue Granados JosueMagnus12

💻
Working on cool stuff
View GitHub Profile
@JosueMagnus12
JosueMagnus12 / index.html
Last active July 31, 2021 00:18
Inheriting styles
<article>
<p>A cool paragraph</p>
<article>
@JosueMagnus12
JosueMagnus12 / index.html
Created July 31, 2021 00:45
Using CSS style sheets
<!DOCTYPE html>
<html lang="en-us">
<head>
<link rel="stylesheet" href="./styles/styles.css">
</head>
<body>
<p>A cool paragraph</p>
</body>
</html>
@JosueMagnus12
JosueMagnus12 / index.html
Created July 31, 2021 00:52
Inline styling
<p style="color: green;">A cool paragraph</p>
@JosueMagnus12
JosueMagnus12 / index.html
Created July 31, 2021 01:31
Methods priority
<!DOCTYPE html>
<html lang="en-us">
<head>
<style>
p{
color: blue;
}
</style>
</head>
<body>
@JosueMagnus12
JosueMagnus12 / index.html
Created July 31, 2021 01:45
Specificity
<!DOCTYPE html>
<html lang="en-us">
<head>
<style>
p{
color: red;
}
.paragraph{
color: yellow;
<!DOCTYPE html>
<html lang="en-us">
<head>
<link rel="stylesheet" href="./styles/styles.css">
</head>
<body>
<p id="p1">A cool paragraph</p>
</body>
</html>
<!DOCTYPE html>
<html lang="en-us">
<head>
<style>
p{
color: blue;
border: 1px solid red;
}
.paragraph{
@JosueMagnus12
JosueMagnus12 / index.html
Last active August 16, 2021 15:39
Conflicts across styling methods
<!DOCTYPE html>
<html lang="en-us">
<head>
<link rel="stylesheet" href="./styles/styles.css">
<style>
.paragraph{
color: green;
font-size: 50px;
background-color: aqua;
}
:root {
font-size: 62.5%;
}
h1 {
font-size: 2.6rem;
}
p {
font-size: 1.6rem;
:root {
font-size: 62.5%;
}
h1 {
font-size: 2.6rem;
}
p {
font-size: 1.6rem;