Home » Code snippets

HTML, JavaScript, CSS, jQuery Code Snippets/ Examples

This section contains Source Code Snippets/Examples on HTML, JavaScript, CSS and jQuery. Here you will find most useful and popular source codes.

List of all JavaScript, CSS, jQuery Source Code Snippets/Examples

JavaScript (JS) Tutorial

  1. An Introduction to JavaScript (Vanilla JS)
  2. Basic Web Application Development using JavaScript
  3. Where to place JavaScript Code?
  4. Comments in JavaScript
  5. How to write an HTML output in JavaScript?
  6. How to write into an HTML element in JavaScript?
  7. typeof Operator with Example in JavaScript
  8. delete Operator with Example in JavaScript
  9. const in JavaScript
  10. Assign decimal, octal and hexadecimal values to the variables
  11. Convert decimal to hexadecimal and vice versa
  12. Convert decimal to octal and vice versa
  13. If and Else statement in JavaScript (Vanilla)
  14. break statement with example in JavaScript
  15. continue statement with example in JavaScript
  16. Playing with Number in JavaScript
  17. Understanding Functions and Scopes in JavaScript
  18. Coercion in JavaScript
  19. Loops in JavaScript
  20. Looping Examples/Programs
  21. Example of jumping statement (break, continue)
  22. maps and for...of loops in Javascript
  23. Arrays in JavaScript
  24. Objects in JavaScript
  25. Search from Array of Objects | JavaScript
  26. Arrow function in JavaScript
  27. Try Catch to avoid program freeze in JavaScript
  28. Understanding DOM with JavaScript
  29. Interactive Webpages / Event Handling in JavaScript
  30. Nested Event Handling in JavaScript (on mouse move event)
  31. Event Listener in JavaScript with HTML
  32. Web Application: A To-do List using JavaScript
  33. Local Storage using JavaScript
  34. Sorting Methods in JavaScript

JavaScript properties

  1. undefined property with Example in JavaScript
  2. NaN property with example in JavaScript

JavaScript built-in functions

  1. escape() function with example in JavaScript
  2. unescape() function with example in JavaScript
  3. fill() function with example in JavaScript
  4. includes() function with example in JavaScript
  5. encodeURI() and decodeURI() functions with example in JavaScript
  6. encodeURIComponent() and decodeURIComponent() functions with examples in JavaScript
  7. parseInt() function with example in JavaScript
  8. isNaN() function with example in JavaScript
  9. Number() function with example in JavaScript
  10. String() function with example in JavaScript
  11. eval() function with example in JavaScript

JavaScript String Methods

  1. String toLowerCase() Method with Example in JavaScript
  2. String toUpperCase() Method with Example in JavaScript
  3. String startsWith() Method with Example in JavaScript
  4. String endsWith() Method with Example in JavaScript
  5. String charAt() Method with Example in JavaScript
  6. String charCodeAt() Method with Example in JavaScript
  7. String fromCharCode() Method with Example in JavaScript
  8. String substr() Method with Example in JavaScript
  9. String replace() Method with Example in JavaScript
  10. String indexOf() Method with Example in JavaScript
  11. String lastIndexOf() Method with Example in JavaScript
  12. String search() Method with Example in JavaScript
  13. String concat() Method with Example in JavaScript
  14. Difference between indexOf() and search() methods in JavaScript

JavaScript Number Methods

  1. Number MAX_VALUE Property with Example in JavaScript
  2. Number MIN_VALUE Property with Example in JavaScript
  3. Number isNaN() Method with Example in JavaScript
  4. Number isFinite() Method with Example in JavaScript
  5. Number isInteger() Method with Example in JavaScript
  6. Number toString() Method with Example in JavaScript
  7. Number toExponential() Method with Example in JavaScript
  8. Number toFixed() Method with Example in JavaScript
  9. Number toPrecision() Method with Example in JavaScript

JavaScript Array Methods

  1. Array length property with example in JavaScript
  2. Array constructor property with example in JavaScript
  3. Array isArray() method with example in JavaScript
  4. Array push() method with example in JavaScript
  5. Array pop() method with example in JavaScript
  6. Array shift() method with example in JavaScript
  7. Array unshift() method with example in JavaScript
  8. Array reverse() method with example in JavaScript
  9. Array fill() method with example in JavaScript
  10. Array concat() method with example in JavaScript
  11. Array copyWithin() method with example in JavaScript
  12. Array entries() method with example in JavaScript
  13. Array every() method with example in JavaScript
  14. Array some() method with example in JavaScript
  15. Array filter() method with example in JavaScript
  16. Array find() method with example in JavaScript
  17. Array join() method with example in JavaScript
  18. Array toString() method with example in JavaScript
  19. Difference between join() and toString() Methods in JavaScript

JavaScript Date Methods

  1. Date constructor property with example in JavaScript
  2. Date getDate() method with example in JavaScript
  3. Date getDay() method with example in JavaScript
  4. Date getMonth() method with example in JavaScript
  5. Date getFullYear() method with example in JavaScript
  6. Date getHours() method with example in JavaScript
  7. Date getMinutes() method with example in JavaScript
  8. Date getSeconds() method with example in JavaScript
  9. Date getMilliseconds() method with example in JavaScript
  10. Date getTime() method with example in JavaScript
  11. Get current time in Hours24: Minutes: Seconds format in JavaScript
  12. Get current Date in Date / Month / Year format in JavaScript
  13. Date getTimezoneOffset() method with example in JavaScript
  14. Date getUTCDate() method with example in JavaScript
  15. Date getUTCDay() method with example in JavaScript
  16. Date getUTCMonth() method with example in JavaScript
  17. Date getUTCFullYear() method with example in JavaScript
  18. Date getUTCHours() method with example in JavaScript
  19. Date getUTCMinutes() method with example in JavaScript
  20. Date getUTCSeconds() method with example in JavaScript
  21. Date getUTCMilliseconds() method with example in JavaScript
  22. Get current UTC time in Hours24: Minutes: Seconds format in JavaScript
  23. Get current UTC Date in Date / Month / Year format in JavaScript
  24. now() method with example in JavaScript
  25. Date parse() method with example in JavaScript
  26. Date setDate() method with example in JavaScript
  27. Date setMonth() method with example in JavaScript
  28. Date setFullYear() method with example in JavaScript
  29. Date setHours() method with example in JavaScript
  30. Date setMinutes() method with example in JavaScript
  31. Date setSeconds() method with example in JavaScript

JavaScript (JS) Codes/Examples

  1. Input value from the user using prompt
  2. Example of if with else
  3. Example of if else if
  4. Example of Nested if
  5. Find largest of three numbers using Nested if in JavaScript
  6. Example of Ternary Operator
  7. Image Recognition Game using JavaScript
  8. Code to input age and check person is eligible for voting or not
  9. Function with default value
  10. Function call example with given number of arguments and less arguments
  11. Demonstrate the example of call by value in function
  12. Some of the examples of user-defined functions
  13. Common properties and methods of Array
  14. Code to declare an array and assign the elements using array indexing
  15. Code to declare an array and print using for each loop
  16. Code to declare an array and print using for loop
  17. Password strength checker in JavaScript
  18. Print characters of a string in multiples of N in JavaScript.
  19. How to check whether a string contains a substring in JavaScript?
  20. How to break in nested loops in JavaScript?
  21. Understanding callbacks in JavaScript.
  22. How to create accordions with JavaScript?
  23. JavaScript code to check number is Perfect or not.
  24. JavaScript code to check number is Armstrong or not.
  25. JavaScript code to check whether a Number is Prime or Not.
  26. JavaScript code to find largest of three numbers.
  27. Check number is palindrome or not in JavaScript.
  28. Form validation using JavaScript.
  29. JavaScript code to design calculator.
  30. Disable right click on webpage with JavaScript.
  31. How to make the font bold using JavaScript?
  32. Return multiple elements from function in JavaScript.
  33. How to get URL parameters using JavaScript?
  34. How to copy text to clipboard with JavaScript?
  35. How to get days of current month in JavaScript?
  36. Get browser details through JavaScript.
  37. Calculate the average of arguments in JavaScript.
  38. Ways to access object property in JavaScript.
  39. Count occurrence of a particular character in a string in JavaScript.
  40. Creating a property on prototype in JavaScript.
  41. Create a student object and print the details in JavaScript.
  42. Create a forward and back buttons in JavaScript.
  43. Different ways to create an Object in JavaScript.
  44. How to allow only alphabets in input field in JavaScript?
  45. Get the size of a file with JavaScript.
  46. How to get the decimal part of a floating number in JavaScript?
  47. Get current date, month and year in JavaScript.
  48. How to parse number from string in JavaScript?
  49. How to find absolute value of a number in JavaScript?
  50. Create functions with default arguments in JavaScript.
  51. How to return object from function in JavaScript?
  52. Get index of an element in JavaScript.
  53. Print a fibonacci series in JavaScript.
  54. Find the larger of two numbers in JavaScript.
  55. Convert a number into different base in JavaScript.
  56. Find substring within a string in JavaScript.
  57. Count the number of arguments passed to function in JavaScript.
  58. Ways to create Date object in JavaScript.
  59. Check if number is a valid number in JavaScript.
  60. Determine the largest element in the array in JavaScript.
  61. Addition of two numbers using JavaScript.
  62. Create a user defined array in JavaScript.
  63. Concatenation operator in JavaScript.
  64. New variable declaration keywords in JavaScript.
  65. Dynamically add CSS class with JavaScript.
  66. Reverse an array in JavaScript.
  67. Access global variables inside function in JavaScript.
  68. How to fill dropdowns using JavaScript?
  69. Create a string parser with symbols for actions in JavaScript.
  70. Join elements of an array in JavaScript.
  71. JavaScript multiply every array element with a constant.
  72. JavaScript check if an array element is empty.
  73. Different ways to display output in JavaScript.
  74. Check if an element is present in an Array in JavaScript?
  75. How to change the font-size with JavaScript?
  76. JavaScript Reverse print an array.
  77. Template literals in JavaScript.
  78. How to get the extension of a file using JavaScript?
  79. The JavaScript forEach method in detail.
  80. Generate random number within a range in JavaScript.
  81. JavaScript program to create an object from a function.
  82. JavaScript program to split the keywords in the string.
  83. JavaScript program to check if the variable is a valid string variable.
  84. JavaScript Program to print sum of range with steps.
  85. JavaScript Program to create a power function and print the result.
  86. JavaScript to detect whether page is load on Mobile or Desktop.
  87. JavaScript - Select/Unselect (Check/Uncheck) all CheckBoxes on Button Click.
  88. JavaScript - Allow only numbers in TextBox (Restrict Alphabets and Special Characters).
  89. JavaScript - Redirect to another URL on Button Click.
  90. JavaScript - Display Input Text into Lowercase.
  91. JavaScript - Display Input Text into Uppercase.
  92. JavaScript - Display current Date and Time.
  93. Check selected Radio Button value using JavaScript.
  94. JavaScript function to add two integer numbers.
  95. Show/Hide Div on Button Click using JavaScript.
  96. Display different Alert Message on different Button Click Event using JavaScript.
  97. Display Alert Message on Button Click Event using JavaScript.
  98. JavaScript - Select/Unselect (Check/Uncheck) all CheckBoxes on Button Click.
  99. JavaScript - Print value of all checked (selected) CheckBoxes on Button click.
  100. JavaScript - Print Selected Item from SelectBox.
  101. JavaScript - Add user entered item into ListBox.
  102. JavaScript - Required Field Validator for TextBox on Submit.
  103. JavaScript - Move Object with Arrow Keys using JavaScript Function.
  104. JavaScript - Set Focus on Particular Field in a Form using JavaScript Function.
  105. JavaScript - Set Customize Text in Browser Status Bar using JavaScript Function.
  106. JavaScript - Detect and Display Screen Resolution using JavaScript Function.
  107. JavaScript - Function to Refresh Page on Button Click.
  108. JavaScript - Disable Button after Click using JavaScript Function.
  109. JavaScript - Disable Button after Click using JavaScript Function.
  110. JavaScript - Close Current Tab on Button Click with Confirmation.
  111. JavaScript - Show/Hide Paragraph Text inside Div on Button Click.
  112. Simple Web Dictionary | JavaScript Switch Statement Project
  113. Data Unit Conversion Tool in JavaScript
  114. Age calculator Web Application | Integrating JavaScript function with form
  115. Lowercase to Uppercase Converter JavaScript Tool | Web App Project
  116. Sample report card web application prototype using JavaScript
  117. JavaScript | Create an object and display its values in a table
  118. JavaScript | Create an object and display its content in a table through JavaScript function
  119. JavaScript | Create an object by passing values in the function and display in the table


Cascading styles sheet (CSS)

  1. Pseudo Classes | CSS - November 07, 2018
  2. How to change link color on hover in CSS? - November 08, 2017
  3. Style alternate rows of a table with CSS. - October 31, 2017
  4. Change the perspective of an element in CSS. - October 27, 2017
  5. Use custom fonts to webpage with CSS. - October 27, 2017
  6. Flip an image element using CSS. - October 24, 2017
  7. How to set perfect image background with CSS? - October 22, 2017
  8. Overlap one element over another with CSS. - October 22, 2017
  9. Change image shapes with CSS. - October 21, 2017
  10. Show captions on image hover using CSS. - October 16, 2017
  11. Creating Gradients with CSS3. - October 16, 2017
  12. Vertically center any element in CSS. - October 14, 2017
  13. Rotate fix an image on page with CSS. - October 13, 2017
  14. How to make background image fit on screen using CSS? - October 13, 2017
  15. How to scale a picture size in CSS? - October 12, 2017
  16. How to make a div centre align using CSS? - October 12, 2017
  17. Center any element horizontally in CSS. - October 11, 2017
  18. Styling input placeholder with CSS. - October 09, 2017
  19. Make a drop-cap effect using CSS. - July 17, 2017
  20. Creating a loading animation with CSS. - July 11, 2017
  21. Custom Radio Button Styling with CSS. - June 24, 2017
  22. Basic Shapes in CSS.
  23. - May 28, 2017
  24. CSS - Apply Different Style (Color, Background Color) on Even and Odd Table Columns (td).
  25. CSS - Apply Different Style (Color, Background Color) on Even and Odd Table Rows.
  26. CSS - Make Two DIVs Left and Right Aligned inside Main DIV.
  27. CSS - Make Inner DIV center inside Outer DIV.
  28. CSS - Create and Apply CSS for All Buttons on the Page.









Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.
Learn PCB Designing: PCB DESIGNING TUTORIAL







Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing » Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.