Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 85bac79

Browse files
authored
Update LESSONPLAN.md
1 parent 0d719aa commit 85bac79

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

Week1/LESSONPLAN.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The [Document Object Model (DOM)](https://developer.mozilla.org/en-US/docs/Web/A
2525

2626
**It is not a programming language but without it JavaScript would not have any knowledge of our web page/HTML document.**
2727
### Example
28-
```HTML
28+
```HTML
2929
<!DOCTYPE html>
3030
<html>
3131
<head>
@@ -37,30 +37,28 @@ The [Document Object Model (DOM)](https://developer.mozilla.org/en-US/docs/Web/A
3737
<a href="https://www.w3schools.com/js/pic_htmltree.gif">My link</a>
3838
</body>
3939
</html>
40-
```
40+
```
4141

42-
![Pictorial Representation of DOM](https://www.w3schools.com/js/pic_htmltree.gif)
42+
![Pictorial Representation of DOM](https://www.w3schools.com/js/pic_htmltree.gif)
4343
### Exercise
4444
### Essence
4545

4646

4747
## 2. DOM manipulation
4848
### Explanation
4949
### Example
50-
1. Finding DOM elements in HTML page
5150

51+
1. Finding DOM elements in HTML page
5252
- `document.getElementById(id)` - Find an element by element id
5353
- `document.getElementsByTagName(name)` - Find elements by tag name
5454
- `document.getElementsByClassName(name)` - Find elements by class name
5555

5656
2. Adding and Deleting elements in HTML page
57-
5857
- `document.createElement(element)` - Create a new HTML element
5958
- `document.removeChild(element)` - Remove an HTML element
6059
- `document.appendChild(element)` - Add an HTML element
61-
60+
6261
3. Changing existing HTML elements
63-
6462
- `element.innerHTML` - Change the content/layout of the element
6563
- `element.innerText` - Change just the text of the element
6664
- `element.setAttribute(attribute, value)` - Set/Change attribute of an element

0 commit comments

Comments
 (0)