Skip to content

Instantly share code, notes, and snippets.

@helderdarocha
Created August 19, 2020 19:02
Show Gist options
  • Save helderdarocha/2043004b6e9837f524bd747ee5d9a11e to your computer and use it in GitHub Desktop.
Save helderdarocha/2043004b6e9837f524bd747ee5d9a11e to your computer and use it in GitHub Desktop.
Indentation Practice
<!-- Please clean up this messy html, after you indent, notice how the text doesn't move-->
<!DOCTYPE html>
<html>
<head>
<title>
Basic I
</title>
</head>
<body>
<h1>
What language do you love?
</h1>
<p>
I love HTML!
</p>
</body>
</html>
<!--Part Two below -->
<!DOCTYPE html>
<html>
<head>
<title>
Basic II
</title>
</head>
<body>
<table>
<thead>
<tr><th>First Name</th><th>Last Name</th><th>Email</th><th>Password</th></tr>
</thead>
<tbody>
<tr>
<td>
Brendan
</td>
<td>
Stanton
</td>
<td>
brendanrocks@gmail.com
</td><td> FakePassword123 </td></tr>
</tbody>
</table>
<h1>Here is a list of my favorite things:</h1>
<ul><li>Food</li>
<li>Bandwidth</li>
<li>Coffee</li>
<li>Beach
</li>
</ul>
</body>
</html>
let a = document.getElementsByTagName("h1")[0]
console.log(a.innerText)
a.innerHTML = "Hi there!";
h1 {color: red}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment