-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocument.html
More file actions
23 lines (22 loc) · 1.34 KB
/
document.html
File metadata and controls
23 lines (22 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="styles.css">
<title>JS Tutorial - Educational Websites</title>
</head>
<body>
<section>
<h1 id="intro">J<span>ava</span>S<span>crip</span>t Tu<span>tori</span>al</h1><br><br><br>
<!-- Lesson 2 -->
<h2 id="lesson-text">Lesson 6 - Documents</h2><br><br><br>
<h3 id="lesson-text2">Documents are one of the only things that can get something from HTML for you to edit. You have to do document.getElementById("Id").property = set; You have to create an id in html like this <code><tag id="name"></tag></code><br><br> Use any tag and id. Put it in the "Id" section of the document.getElementById("Id"), then edit. <br><br>Here are some options. innerHTML, where you can change text, src, to set a image source for the image, and styles, like style.display , to make something visible, style.borderColor, to add a border color, you get the point. <br><br>Documents get the thing you want by putting in its id, and allows you to edit it, in JS.
<br>
<br>
<br>
<a href="./functions.html" class="green-btn">< Previous</a><span style="color:transparent;">-------------------------</span>
<a href="./alerts.html" class="green-btn">Next ></a>
</h3>
</section>
</body>
</html>