Uncategorized

Count number of images available on the webpage

Hello friends, In this tutorial, we will see the HTML, CSS, and JAVASCRIPT code to Count the number of images available on the webpage. Table Of Contents: HTML CODE JAVASCRIPT CODE OUTPUT OTHER POSTS   <!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <link rel=”stylesheet” href=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css” integrity=”sha384- JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z” crossorigin=”anonymous”> <script src=”https://code.jquery.com/jquery-3.5.1.slim.min.js” integrity=”sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj” …

Count number of images available on the webpage Read More »

How to create a bold text using javascript.

How to create a bold text using javascript. <! Doctype html> <html lang=”en”> <head> <title> make a text bold using javascript</title> </head> <body> <p id=”mytext”> this is some text </p > <!DOCTYPE html> <html lang=”en”> <head>     <meta charset=”UTF-8″>     <meta name=”viewport” content=”width=device-width, initial-scale=1.0″>     <title>Make Text Bold with JavaScript</title> </head> <body>     <p id=”myText”>This is some text.</p>     <button onclick=”makeTextBold()”>Make Text Bold</button>     <script>         function makeTextBold() {             var element = document.getElementById(“myText”);             element.innerHTML = “<b>” + element.innerHTML + “</b>”;         }     </script> </body> </html>  

Python Regular Expressions (RegEx) with examples

Regular Expressions (regex) are patterns used to match character combinations in strings. Let’s go through some examples using Python’s re module. Importing the re module: import re   Basic Match: pattern = r”hello” text = “hello world” match = re.search(pattern, text) if match: print(“Found:”, match.group())   .: Matches any character except newline. ^: Matches the …

Python Regular Expressions (RegEx) with examples Read More »

Python Naming Convention

Python naming conventions are guidelines that help ensure consistency and readability in Python code. They are part of PEP 8, the Python Enhancement Proposal that outlines coding standards for Python. Here are the key conventions: Naming Conventions for Different Elements Variables and Functions: Use lowercase letters and separate words with underscores (snake_case). Example: my_variable, calculate_area() …

Python Naming Convention Read More »

Scroll to Top