Latest Tutorials

The nodeName and tagName properties

<!DOCTYPE html> <html> <body> <ul id="numbers"...

Creating and adding new elements

<!DOCTYPE html> <html> <style> li+li+li {font-weight:bold;...

Example with getAttribute(), setAttribute() and removeAttribute() methods

<!DOCTYPE html> <html> <body> <input type="button"...

How to add text nodes to a paragraph

<!DOCTYPE html> <html> <body> <script> //Create p...

The comment type of DOM

<!DOCTYPE html> <html> <style> span {font-size:0.8em; fon...

The documentFragment type - changing an element in a list

<!DOCTYPE html> <html> <body> <ul><li>Asia</li&...

Implementing and manipulating HTML attributes with DOM methods

<!DOCTYPE html> <html> <head> <style> .democlass {...

Example of scrolling methods

<!DOCTYPE html> <html> <head> <style> p, button {font-s...

Example of childNodes property

<!DOCTYPE html> <html> <body> <style> p {font-style:ita...

Examples of contains() and compareDocumentPosition() methods

<!DOCTYPE html> <html> <style> button {padding:2px; margin:0...