This is a simple web application that allows users to search for specific text within a paragraph and highlights all occurrences of the searched text.
- Input field to enter the text you want to search for.
- Clickable button to initiate the search.
- Automatic highlighting of all matches within the paragraph.
- Display of the number of matches found.
- Feedback message indicating whether any results were found.
- Enter the text you want to search for in the input field labeled "Search...".
- Click the "Search" button to initiate the search.
- Matches will be highlighted in yellow within the paragraph.
- The number of matches found will be displayed above the paragraph.
- If no matches are found, a message in red will indicate this.
- The application uses JavaScript to perform a search within the paragraph element.
- It utilizes regular expressions to find all occurrences of the searched text, ignoring case sensitivity.
- Matches are then highlighted using HTML
<mark>
tags. - The application provides visual feedback to the user based on the search results.
- HTML
- CSS
- JavaScript
- Download the ZIP file from the GitHub repository.
- Extract the ZIP file to your desired location.
- Open the extracted folder.
- Double-click the
index.html
file to open it in a web browser.
- Clone the repository using the following command in your terminal or command prompt:
git clone https://github.com/0xelsherif/Search-Text-Highlighter.git
- Navigate to the cloned directory:
cd Search-Text-Highlighter
- Open the
index.html
file in a web browser.
If you find this project useful or interesting, consider giving it a star ⭐ on GitHub and spreading the word! Your support means a lot to me and helps in maintaining and improving the project.
If you'd like to contribute to the project, whether it's fixing bugs, adding new features, or improving documentation, feel free to open a pull request. Contributions of all kinds are welcome!
Follow me on GitHub to stay updated with my latest projects and contributions:
If you'd like to support the development of this project further or express your appreciation with a small gesture, consider buying me a coffee! Your support helps keep me fueled for more coding sessions. Thank you for your support!