diff --git a/about.html b/about.html new file mode 100644 index 0000000..e1a3aff --- /dev/null +++ b/about.html @@ -0,0 +1,17 @@ + + + + + + About Me + + + + + + \ No newline at end of file diff --git a/js-dom.html b/js-dom.html new file mode 100644 index 0000000..b52d623 --- /dev/null +++ b/js-dom.html @@ -0,0 +1,40 @@ + + + + + + Document + + +

+

+ + + \ No newline at end of file diff --git a/main.js b/main.js new file mode 100644 index 0000000..6693eb1 --- /dev/null +++ b/main.js @@ -0,0 +1,18 @@ +const lis = document.querySelectorAll("li"); +lis[0].textContent = "Nickname: none"; +lis[1].textContent = "Favorites: baking, gardening, pottery"; +lis[2].textContent = "Hometown: Philadelphia"; +lis[3].textContent = "Random fact: Oprah loves bread."; +// change
  • color +for (let i=0; i + + + + + Table of Contents + + + +
    +

    Table of Contents

    +
    +
    +
    +

    Fruits

    +

    Red Fruits

    +

    Apple

    +

    Raspberry

    +

    Orange Fruits

    +

    Orange

    +

    Tangerine

    +

    Vegetables

    +

    Vegetables Which Are Actually Fruits

    +

    Tomato

    +

    Eggplant

    +
    + + + \ No newline at end of file diff --git a/table-of-contents.js b/table-of-contents.js new file mode 100644 index 0000000..ac7df4b --- /dev/null +++ b/table-of-contents.js @@ -0,0 +1,38 @@ +const toc = document.querySelectorAll("h1, h2, h3"); + let ul = document.createElement('ul'); + ul.setAttribute("class", "main"); + document.querySelector('div').appendChild(ul); + let li; + let text; + let oldLi; + for (let i=1; i