Creating nested elements dynamically












9















I have this array of strings var arr = ["ul", "li", "strong", "em", "u"].



How can I make these into DOM Elements one inside another from left to right, first element as the root element. Without using ID because of some reason.



And maybe by using loop for it to be flexible to any number of elements.



var new_element = document.createElement(arr[0]);



I'm expecting something like this:



<ul>
<li><strong><em><u>Text Here</u></em></strong></li>
</ul>


Thank you.










share|improve this question




















  • 1





    You want to know about Node.appendChild.

    – moonwave99
    2 days ago
















9















I have this array of strings var arr = ["ul", "li", "strong", "em", "u"].



How can I make these into DOM Elements one inside another from left to right, first element as the root element. Without using ID because of some reason.



And maybe by using loop for it to be flexible to any number of elements.



var new_element = document.createElement(arr[0]);



I'm expecting something like this:



<ul>
<li><strong><em><u>Text Here</u></em></strong></li>
</ul>


Thank you.










share|improve this question




















  • 1





    You want to know about Node.appendChild.

    – moonwave99
    2 days ago














9












9








9


1






I have this array of strings var arr = ["ul", "li", "strong", "em", "u"].



How can I make these into DOM Elements one inside another from left to right, first element as the root element. Without using ID because of some reason.



And maybe by using loop for it to be flexible to any number of elements.



var new_element = document.createElement(arr[0]);



I'm expecting something like this:



<ul>
<li><strong><em><u>Text Here</u></em></strong></li>
</ul>


Thank you.










share|improve this question
















I have this array of strings var arr = ["ul", "li", "strong", "em", "u"].



How can I make these into DOM Elements one inside another from left to right, first element as the root element. Without using ID because of some reason.



And maybe by using loop for it to be flexible to any number of elements.



var new_element = document.createElement(arr[0]);



I'm expecting something like this:



<ul>
<li><strong><em><u>Text Here</u></em></strong></li>
</ul>


Thank you.







javascript html dom






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 days ago









Community

11




11










asked 2 days ago









MuyieMuyie

728




728








  • 1





    You want to know about Node.appendChild.

    – moonwave99
    2 days ago














  • 1





    You want to know about Node.appendChild.

    – moonwave99
    2 days ago








1




1





You want to know about Node.appendChild.

– moonwave99
2 days ago





You want to know about Node.appendChild.

– moonwave99
2 days ago












3 Answers
3






active

oldest

votes


















7














You can do this with reduceRight() which avoids needing to query the result to get the deepest value because it starts with the deepest element and works out. The return value will be the topmost element:






var arr = ["ul", "li", "strong", "em", "u"]

let el = arr.reduceRight((el, n) => {
let d = document.createElement(n)
d.appendChild(el)
return d
}, document.createTextNode("Text Here"))

document.getElementById('container').appendChild(el)

<div id = "container"></div>





It also fails gracefully with an empty array:






var arr = 

let el = arr.reduceRight((el, n) => {
let d = document.createElement(n)
d.appendChild(el)
return d
}, document.createTextNode("Text Here"))

document.getElementById('container').appendChild(el)

<div id = "container"></div>








share|improve this answer



















  • 1





    Great! Works as expected. I'll be analyzing how this works and read about the reduce and reduceRight function. Thank you

    – Muyie
    2 days ago



















11














You can use Array.prototype.reduce and Node.prototype.appendChild.



https://jsbin.com/hizetekato/edit?html,js,output






var arr = ["ul", "li", "strong", "em", "u"];

function createChildren(mount, arr) {
return arr.reduce((parent, elementName, i) => {
const element = document.createElement(elementName);
parent.appendChild(element);
return element;
}, mount);
}

const deepest = createChildren(document.querySelector('#root'), arr);

deepest.innerText = 'WebDevNSK'

<div id="root"></div>








share|improve this answer


























  • Seems like this is what I am looking for. I'll try to analyze it. And read about .reduce() Thank you btw.

    – Muyie
    2 days ago











  • What about => parent.appendChild(document.createElement(elementName));? Node.appendChild returns the appended child. However, readability is probably more important that concision.

    – Solomon Ucko
    2 days ago



















0














createDocumentFragment() and run the array through a loop. On each iteration createElement() and appendChild()






const frag = document.createDocumentFragment();
const useless = ["ul", "li", "strong", "em", "u"];

let previous;
for (let u = 0; u < useless.length; u++) {
const current = document.createElement(useless[u]);
if (u === 0) {
frag.appendChild(current);
} else {
previous.appendChild(current);
}
previous = current;
}

document.body.appendChild(frag);

ul {
outline: 5px dashed green;
padding: 15px;
}

li {
outline: 5px solid blue;
padding: 12px;
}

strong {
outline: 5px dashed red;
padding: 9px
}

em {
outline: 5px dashed grey;
padding: 6px
}

u {
outline: 5px solid black;
padding: 3px;
}

u::before {
content: 'THIS TEXT SHOULD BE UNDERLINED'
}








share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55311908%2fcreating-nested-elements-dynamically%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    7














    You can do this with reduceRight() which avoids needing to query the result to get the deepest value because it starts with the deepest element and works out. The return value will be the topmost element:






    var arr = ["ul", "li", "strong", "em", "u"]

    let el = arr.reduceRight((el, n) => {
    let d = document.createElement(n)
    d.appendChild(el)
    return d
    }, document.createTextNode("Text Here"))

    document.getElementById('container').appendChild(el)

    <div id = "container"></div>





    It also fails gracefully with an empty array:






    var arr = 

    let el = arr.reduceRight((el, n) => {
    let d = document.createElement(n)
    d.appendChild(el)
    return d
    }, document.createTextNode("Text Here"))

    document.getElementById('container').appendChild(el)

    <div id = "container"></div>








    share|improve this answer



















    • 1





      Great! Works as expected. I'll be analyzing how this works and read about the reduce and reduceRight function. Thank you

      – Muyie
      2 days ago
















    7














    You can do this with reduceRight() which avoids needing to query the result to get the deepest value because it starts with the deepest element and works out. The return value will be the topmost element:






    var arr = ["ul", "li", "strong", "em", "u"]

    let el = arr.reduceRight((el, n) => {
    let d = document.createElement(n)
    d.appendChild(el)
    return d
    }, document.createTextNode("Text Here"))

    document.getElementById('container').appendChild(el)

    <div id = "container"></div>





    It also fails gracefully with an empty array:






    var arr = 

    let el = arr.reduceRight((el, n) => {
    let d = document.createElement(n)
    d.appendChild(el)
    return d
    }, document.createTextNode("Text Here"))

    document.getElementById('container').appendChild(el)

    <div id = "container"></div>








    share|improve this answer



















    • 1





      Great! Works as expected. I'll be analyzing how this works and read about the reduce and reduceRight function. Thank you

      – Muyie
      2 days ago














    7












    7








    7







    You can do this with reduceRight() which avoids needing to query the result to get the deepest value because it starts with the deepest element and works out. The return value will be the topmost element:






    var arr = ["ul", "li", "strong", "em", "u"]

    let el = arr.reduceRight((el, n) => {
    let d = document.createElement(n)
    d.appendChild(el)
    return d
    }, document.createTextNode("Text Here"))

    document.getElementById('container').appendChild(el)

    <div id = "container"></div>





    It also fails gracefully with an empty array:






    var arr = 

    let el = arr.reduceRight((el, n) => {
    let d = document.createElement(n)
    d.appendChild(el)
    return d
    }, document.createTextNode("Text Here"))

    document.getElementById('container').appendChild(el)

    <div id = "container"></div>








    share|improve this answer













    You can do this with reduceRight() which avoids needing to query the result to get the deepest value because it starts with the deepest element and works out. The return value will be the topmost element:






    var arr = ["ul", "li", "strong", "em", "u"]

    let el = arr.reduceRight((el, n) => {
    let d = document.createElement(n)
    d.appendChild(el)
    return d
    }, document.createTextNode("Text Here"))

    document.getElementById('container').appendChild(el)

    <div id = "container"></div>





    It also fails gracefully with an empty array:






    var arr = 

    let el = arr.reduceRight((el, n) => {
    let d = document.createElement(n)
    d.appendChild(el)
    return d
    }, document.createTextNode("Text Here"))

    document.getElementById('container').appendChild(el)

    <div id = "container"></div>








    var arr = ["ul", "li", "strong", "em", "u"]

    let el = arr.reduceRight((el, n) => {
    let d = document.createElement(n)
    d.appendChild(el)
    return d
    }, document.createTextNode("Text Here"))

    document.getElementById('container').appendChild(el)

    <div id = "container"></div>





    var arr = ["ul", "li", "strong", "em", "u"]

    let el = arr.reduceRight((el, n) => {
    let d = document.createElement(n)
    d.appendChild(el)
    return d
    }, document.createTextNode("Text Here"))

    document.getElementById('container').appendChild(el)

    <div id = "container"></div>





    var arr = 

    let el = arr.reduceRight((el, n) => {
    let d = document.createElement(n)
    d.appendChild(el)
    return d
    }, document.createTextNode("Text Here"))

    document.getElementById('container').appendChild(el)

    <div id = "container"></div>





    var arr = 

    let el = arr.reduceRight((el, n) => {
    let d = document.createElement(n)
    d.appendChild(el)
    return d
    }, document.createTextNode("Text Here"))

    document.getElementById('container').appendChild(el)

    <div id = "container"></div>






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered 2 days ago









    Mark MeyerMark Meyer

    39.6k33162




    39.6k33162








    • 1





      Great! Works as expected. I'll be analyzing how this works and read about the reduce and reduceRight function. Thank you

      – Muyie
      2 days ago














    • 1





      Great! Works as expected. I'll be analyzing how this works and read about the reduce and reduceRight function. Thank you

      – Muyie
      2 days ago








    1




    1





    Great! Works as expected. I'll be analyzing how this works and read about the reduce and reduceRight function. Thank you

    – Muyie
    2 days ago





    Great! Works as expected. I'll be analyzing how this works and read about the reduce and reduceRight function. Thank you

    – Muyie
    2 days ago













    11














    You can use Array.prototype.reduce and Node.prototype.appendChild.



    https://jsbin.com/hizetekato/edit?html,js,output






    var arr = ["ul", "li", "strong", "em", "u"];

    function createChildren(mount, arr) {
    return arr.reduce((parent, elementName, i) => {
    const element = document.createElement(elementName);
    parent.appendChild(element);
    return element;
    }, mount);
    }

    const deepest = createChildren(document.querySelector('#root'), arr);

    deepest.innerText = 'WebDevNSK'

    <div id="root"></div>








    share|improve this answer


























    • Seems like this is what I am looking for. I'll try to analyze it. And read about .reduce() Thank you btw.

      – Muyie
      2 days ago











    • What about => parent.appendChild(document.createElement(elementName));? Node.appendChild returns the appended child. However, readability is probably more important that concision.

      – Solomon Ucko
      2 days ago
















    11














    You can use Array.prototype.reduce and Node.prototype.appendChild.



    https://jsbin.com/hizetekato/edit?html,js,output






    var arr = ["ul", "li", "strong", "em", "u"];

    function createChildren(mount, arr) {
    return arr.reduce((parent, elementName, i) => {
    const element = document.createElement(elementName);
    parent.appendChild(element);
    return element;
    }, mount);
    }

    const deepest = createChildren(document.querySelector('#root'), arr);

    deepest.innerText = 'WebDevNSK'

    <div id="root"></div>








    share|improve this answer


























    • Seems like this is what I am looking for. I'll try to analyze it. And read about .reduce() Thank you btw.

      – Muyie
      2 days ago











    • What about => parent.appendChild(document.createElement(elementName));? Node.appendChild returns the appended child. However, readability is probably more important that concision.

      – Solomon Ucko
      2 days ago














    11












    11








    11







    You can use Array.prototype.reduce and Node.prototype.appendChild.



    https://jsbin.com/hizetekato/edit?html,js,output






    var arr = ["ul", "li", "strong", "em", "u"];

    function createChildren(mount, arr) {
    return arr.reduce((parent, elementName, i) => {
    const element = document.createElement(elementName);
    parent.appendChild(element);
    return element;
    }, mount);
    }

    const deepest = createChildren(document.querySelector('#root'), arr);

    deepest.innerText = 'WebDevNSK'

    <div id="root"></div>








    share|improve this answer















    You can use Array.prototype.reduce and Node.prototype.appendChild.



    https://jsbin.com/hizetekato/edit?html,js,output






    var arr = ["ul", "li", "strong", "em", "u"];

    function createChildren(mount, arr) {
    return arr.reduce((parent, elementName, i) => {
    const element = document.createElement(elementName);
    parent.appendChild(element);
    return element;
    }, mount);
    }

    const deepest = createChildren(document.querySelector('#root'), arr);

    deepest.innerText = 'WebDevNSK'

    <div id="root"></div>








    var arr = ["ul", "li", "strong", "em", "u"];

    function createChildren(mount, arr) {
    return arr.reduce((parent, elementName, i) => {
    const element = document.createElement(elementName);
    parent.appendChild(element);
    return element;
    }, mount);
    }

    const deepest = createChildren(document.querySelector('#root'), arr);

    deepest.innerText = 'WebDevNSK'

    <div id="root"></div>





    var arr = ["ul", "li", "strong", "em", "u"];

    function createChildren(mount, arr) {
    return arr.reduce((parent, elementName, i) => {
    const element = document.createElement(elementName);
    parent.appendChild(element);
    return element;
    }, mount);
    }

    const deepest = createChildren(document.querySelector('#root'), arr);

    deepest.innerText = 'WebDevNSK'

    <div id="root"></div>






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited 2 days ago









    Jack Bashford

    13.1k31847




    13.1k31847










    answered 2 days ago









    dangreendangreen

    1498




    1498













    • Seems like this is what I am looking for. I'll try to analyze it. And read about .reduce() Thank you btw.

      – Muyie
      2 days ago











    • What about => parent.appendChild(document.createElement(elementName));? Node.appendChild returns the appended child. However, readability is probably more important that concision.

      – Solomon Ucko
      2 days ago



















    • Seems like this is what I am looking for. I'll try to analyze it. And read about .reduce() Thank you btw.

      – Muyie
      2 days ago











    • What about => parent.appendChild(document.createElement(elementName));? Node.appendChild returns the appended child. However, readability is probably more important that concision.

      – Solomon Ucko
      2 days ago

















    Seems like this is what I am looking for. I'll try to analyze it. And read about .reduce() Thank you btw.

    – Muyie
    2 days ago





    Seems like this is what I am looking for. I'll try to analyze it. And read about .reduce() Thank you btw.

    – Muyie
    2 days ago













    What about => parent.appendChild(document.createElement(elementName));? Node.appendChild returns the appended child. However, readability is probably more important that concision.

    – Solomon Ucko
    2 days ago





    What about => parent.appendChild(document.createElement(elementName));? Node.appendChild returns the appended child. However, readability is probably more important that concision.

    – Solomon Ucko
    2 days ago











    0














    createDocumentFragment() and run the array through a loop. On each iteration createElement() and appendChild()






    const frag = document.createDocumentFragment();
    const useless = ["ul", "li", "strong", "em", "u"];

    let previous;
    for (let u = 0; u < useless.length; u++) {
    const current = document.createElement(useless[u]);
    if (u === 0) {
    frag.appendChild(current);
    } else {
    previous.appendChild(current);
    }
    previous = current;
    }

    document.body.appendChild(frag);

    ul {
    outline: 5px dashed green;
    padding: 15px;
    }

    li {
    outline: 5px solid blue;
    padding: 12px;
    }

    strong {
    outline: 5px dashed red;
    padding: 9px
    }

    em {
    outline: 5px dashed grey;
    padding: 6px
    }

    u {
    outline: 5px solid black;
    padding: 3px;
    }

    u::before {
    content: 'THIS TEXT SHOULD BE UNDERLINED'
    }








    share|improve this answer




























      0














      createDocumentFragment() and run the array through a loop. On each iteration createElement() and appendChild()






      const frag = document.createDocumentFragment();
      const useless = ["ul", "li", "strong", "em", "u"];

      let previous;
      for (let u = 0; u < useless.length; u++) {
      const current = document.createElement(useless[u]);
      if (u === 0) {
      frag.appendChild(current);
      } else {
      previous.appendChild(current);
      }
      previous = current;
      }

      document.body.appendChild(frag);

      ul {
      outline: 5px dashed green;
      padding: 15px;
      }

      li {
      outline: 5px solid blue;
      padding: 12px;
      }

      strong {
      outline: 5px dashed red;
      padding: 9px
      }

      em {
      outline: 5px dashed grey;
      padding: 6px
      }

      u {
      outline: 5px solid black;
      padding: 3px;
      }

      u::before {
      content: 'THIS TEXT SHOULD BE UNDERLINED'
      }








      share|improve this answer


























        0












        0








        0







        createDocumentFragment() and run the array through a loop. On each iteration createElement() and appendChild()






        const frag = document.createDocumentFragment();
        const useless = ["ul", "li", "strong", "em", "u"];

        let previous;
        for (let u = 0; u < useless.length; u++) {
        const current = document.createElement(useless[u]);
        if (u === 0) {
        frag.appendChild(current);
        } else {
        previous.appendChild(current);
        }
        previous = current;
        }

        document.body.appendChild(frag);

        ul {
        outline: 5px dashed green;
        padding: 15px;
        }

        li {
        outline: 5px solid blue;
        padding: 12px;
        }

        strong {
        outline: 5px dashed red;
        padding: 9px
        }

        em {
        outline: 5px dashed grey;
        padding: 6px
        }

        u {
        outline: 5px solid black;
        padding: 3px;
        }

        u::before {
        content: 'THIS TEXT SHOULD BE UNDERLINED'
        }








        share|improve this answer













        createDocumentFragment() and run the array through a loop. On each iteration createElement() and appendChild()






        const frag = document.createDocumentFragment();
        const useless = ["ul", "li", "strong", "em", "u"];

        let previous;
        for (let u = 0; u < useless.length; u++) {
        const current = document.createElement(useless[u]);
        if (u === 0) {
        frag.appendChild(current);
        } else {
        previous.appendChild(current);
        }
        previous = current;
        }

        document.body.appendChild(frag);

        ul {
        outline: 5px dashed green;
        padding: 15px;
        }

        li {
        outline: 5px solid blue;
        padding: 12px;
        }

        strong {
        outline: 5px dashed red;
        padding: 9px
        }

        em {
        outline: 5px dashed grey;
        padding: 6px
        }

        u {
        outline: 5px solid black;
        padding: 3px;
        }

        u::before {
        content: 'THIS TEXT SHOULD BE UNDERLINED'
        }








        const frag = document.createDocumentFragment();
        const useless = ["ul", "li", "strong", "em", "u"];

        let previous;
        for (let u = 0; u < useless.length; u++) {
        const current = document.createElement(useless[u]);
        if (u === 0) {
        frag.appendChild(current);
        } else {
        previous.appendChild(current);
        }
        previous = current;
        }

        document.body.appendChild(frag);

        ul {
        outline: 5px dashed green;
        padding: 15px;
        }

        li {
        outline: 5px solid blue;
        padding: 12px;
        }

        strong {
        outline: 5px dashed red;
        padding: 9px
        }

        em {
        outline: 5px dashed grey;
        padding: 6px
        }

        u {
        outline: 5px solid black;
        padding: 3px;
        }

        u::before {
        content: 'THIS TEXT SHOULD BE UNDERLINED'
        }





        const frag = document.createDocumentFragment();
        const useless = ["ul", "li", "strong", "em", "u"];

        let previous;
        for (let u = 0; u < useless.length; u++) {
        const current = document.createElement(useless[u]);
        if (u === 0) {
        frag.appendChild(current);
        } else {
        previous.appendChild(current);
        }
        previous = current;
        }

        document.body.appendChild(frag);

        ul {
        outline: 5px dashed green;
        padding: 15px;
        }

        li {
        outline: 5px solid blue;
        padding: 12px;
        }

        strong {
        outline: 5px dashed red;
        padding: 9px
        }

        em {
        outline: 5px dashed grey;
        padding: 6px
        }

        u {
        outline: 5px solid black;
        padding: 3px;
        }

        u::before {
        content: 'THIS TEXT SHOULD BE UNDERLINED'
        }






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 days ago









        zer00nezer00ne

        25k32545




        25k32545






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55311908%2fcreating-nested-elements-dynamically%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Masuk log Menu navigasi

            Identifying “long and narrow” polygons in with PostGISlength and width of polygonWhy postgis st_overlaps reports Qgis' “avoid intersections” generated polygon as overlapping with others?Adjusting polygons to boundary and filling holesDrawing polygons with fixed area?How to remove spikes in Polygons with PostGISDeleting sliver polygons after difference operation in QGIS?Snapping boundaries in PostGISSplit polygon into parts adding attributes based on underlying polygon in QGISSplitting overlap between polygons and assign to nearest polygon using PostGIS?Expanding polygons and clipping at midpoint?Removing Intersection of Buffers in Same Layers

            Старые Смолеговицы Содержание История | География | Демография | Достопримечательности | Примечания | НавигацияHGЯOLHGЯOL41 206 832 01641 606 406 141Административно-территориальное деление Ленинградской области«Переписная оброчная книга Водской пятины 1500 года», С. 793«Карта Ингерманландии: Ивангорода, Яма, Копорья, Нотеборга», по материалам 1676 г.«Генеральная карта провинции Ингерманландии» Э. Белинга и А. Андерсина, 1704 г., составлена по материалам 1678 г.«Географический чертёж над Ижорскою землей со своими городами» Адриана Шонбека 1705 г.Новая и достоверная всей Ингерманландии ланткарта. Грав. А. Ростовцев. СПб., 1727 г.Топографическая карта Санкт-Петербургской губернии. 5-и верстка. Шуберт. 1834 г.Описание Санкт-Петербургской губернии по уездам и станамСпецкарта западной части России Ф. Ф. Шуберта. 1844 г.Алфавитный список селений по уездам и станам С.-Петербургской губернииСписки населённых мест Российской Империи, составленные и издаваемые центральным статистическим комитетом министерства внутренних дел. XXXVII. Санкт-Петербургская губерния. По состоянию на 1862 год. СПб. 1864. С. 203Материалы по статистике народного хозяйства в С.-Петербургской губернии. Вып. IX. Частновладельческое хозяйство в Ямбургском уезде. СПб, 1888, С. 146, С. 2, 7, 54Положение о гербе муниципального образования Курское сельское поселениеСправочник истории административно-территориального деления Ленинградской области.Топографическая карта Ленинградской области, квадрат О-35-23-В (Хотыницы), 1930 г.АрхивированоАдминистративно-территориальное деление Ленинградской области. — Л., 1933, С. 27, 198АрхивированоАдминистративно-экономический справочник по Ленинградской области. — Л., 1936, с. 219АрхивированоАдминистративно-территориальное деление Ленинградской области. — Л., 1966, с. 175АрхивированоАдминистративно-территориальное деление Ленинградской области. — Лениздат, 1973, С. 180АрхивированоАдминистративно-территориальное деление Ленинградской области. — Лениздат, 1990, ISBN 5-289-00612-5, С. 38АрхивированоАдминистративно-территориальное деление Ленинградской области. — СПб., 2007, с. 60АрхивированоКоряков Юрий База данных «Этно-языковой состав населённых пунктов России». Ленинградская область.Административно-территориальное деление Ленинградской области. — СПб, 1997, ISBN 5-86153-055-6, С. 41АрхивированоКультовый комплекс Старые Смолеговицы // Электронная энциклопедия ЭрмитажаПроблемы выявления, изучения и сохранения культовых комплексов с каменными крестами: по материалам работ 2016-2017 гг. в Ленинградской области