Home > Anil Kolase

Difference between semantic and non-semantic elements

semantic elements Elements has meaning. Describes its meaning to browser and developer. Example [crayon-674f3d887f063213657238/] Some of semantic elements <section> - <section> element is grouping content. We can split page into different sections. [crayon-674f3d887f06a097780645/] <article> - <article> element is independent and has self-contained content. <article> element used to write Forum post, Blog post, Newspaper article. [crayon-674f3d887f06d388123656/] <header> - <header> element specifies header

This Article is TAGGED in , . Read more

Web Storage in HTML5

Web Storage Using Web Storage we can store data within web browser. Within Web Storage we can stored large amount of data locally. Data within Web Storage is secured. Objects in Web Storage window.localStorage - can not expire data(even if we can removed it). window.sessionStorage - data lost when browser tab closed. Methods in Web Storage setItem(name, value) -

This Article is TAGGED in . Read more

Array functions in javascript

Javascript array functions 1. toString() - convert array to string [crayon-674f3d887f66b035145966/] 2. pop() - remove/delete last element from an array [crayon-674f3d887f66f032489300/] 3. push() - add/insert element at the top [crayon-674f3d887f672475788261/] 4. shift() - remove/delete first element from an array [crayon-674f3d887f674175708844/] 5. unshift() - add/insert element at first position [crayon-674f3d887f677809654151/] 6. concat() - merged(concat) existing array and create new array [crayon-674f3d887f679160046061/] 7. slice() -

This Article is TAGGED in , , , , , , , . Read more

How to create/build web application in Angular?

1. Download and install Node Package Manager(npm) Link to download npm (https://nodejs.org/en/download/) 2. Then install ANGULAR CLI globally Open cmd and Run command [crayon-674f3d887f7cb062001912/] It can install angular globally 3. To Check version on command [crayon-674f3d887f7cf018955104/] [crayon-674f3d887f7d1537832204/] [crayon-674f3d887f7d4107506946/] 4. Create new project Open terminal and run command [crayon-674f3d887f7d6787836491/] Here we create project name my-app Angular cli installs npm packages and creates project files 5. Run

This Article is TAGGED in , . Read more

Show specific number of words in string using JavaScript

<p id="shortWord"></p> <script> var word = "Lorem Ipsum is simply dummy text of the printing and typesetting industry." var wordArr = word.split(" "); var wordShort = wordArr.splice(0, 5).join(" "); document.getElementById('shortWord').innerHTML= wordShort; </script> Output: "Lorem Ipsum is simply dummy"  

This Article is TAGGED in , . Read more