Welcome to Simple Web Project
This is a basic template for a web project using fundamental web technologies: HTML, CSS, and JavaScript.
It serves as a starting point for building simple static or dynamic web pages. Content will be added and refined in future iterations based on the project's specific purpose.
Project Structure & Ideas
Refer to the README.md
file for instructions on how to get started, explore the project structure, and discover design ideas and considerations.
Example Image
Example Table
This is a basic table demonstrating default and potential custom styling.
Header 1 | Header 2 | Header 3 |
---|---|---|
Data 1 | Data 2 | Data 3 |
Data 4 | Data 5 | Data 6 |
Data 7 | Data 8 | Data 9 |
Footer data or summary |
Example Section for JS Interaction (Click)
This area can be updated by JavaScript.
Another Section (List Hover Example)
Hover over the list items below to see a visual change (controlled by CSS class added/removed by JS).
- List item 1
- List item 2
- List item 3
Example Section (Data-* Attribute)
The message below is read from a data-*
attribute on the element above it.
Example Section (Fetch API)
Click the button to fetch data from a placeholder API endpoint (JSONPlaceholder).
Example Section (localStorage)
Enter something and save it directly in your browser's local storage. The value will persist even if you close and reopen the browser (for this domain).
Example Section (Accessibility Toggle)
Click the button to show or hide the content below. ARIA attributes are used to inform screen readers about the state.
Example Section (IntersectionObserver)
This section has the class .observe-me
. When you scroll this element into view, a CSS class is added by JavaScript using the Intersection Observer API. This can be used for scroll-triggered animations (like fade-in) or lazy loading.
Scroll down to see the effect.
Section Below Observer Example
This section exists to ensure there is enough content to scroll and trigger the Intersection Observer example above.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Donec sed odio dui. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.
Example Section (Create, Append, Remove)
Click the button to add new items to the list below. Each item can then be removed individually.
- Existing Item 1
- Existing Item 2
Example Section (Prevent Default Form)
This form submission is intercepted by JavaScript to prevent a page reload. Basic client-side validation is included, demonstrating input feedback and status messages.
Example Section (Copy to Clipboard)
Click the button to copy the text from the box below.
Example Section (Input Character Counter)
Type into the input field to see the character count update.
Example Accordion
Content for accordion item 3. This one starts open.
Example Dropdown
Example Modal
Example Pagination
Demonstrates client-side pagination for the list below.
- Pagination Item 1
- Pagination Item 2
- Pagination Item 3
- Pagination Item 4
- Pagination Item 5
- Pagination Item 6
- Pagination Item 7
- Pagination Item 8
- Pagination Item 9
- Pagination Item 10
- Pagination Item 11
- Pagination Item 12
- Pagination Item 13
Example Read More/Less
This content is designed to be longer than a certain threshold (e.g., 100px height) to trigger the "Read More" functionality. When the content's height exceeds this threshold, JavaScript will apply a class to the container, allowing CSS to truncate the visible content and show a toggle button.
Clicking the button will reveal the full content and change the button text to "Read Less". Clicking again will collapse it back. This is useful for displaying long articles or descriptions without overwhelming the user initially.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Donec sed odio dui. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.
Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Aenean lacinia bibendum nulla sed consectetur. Maecenas sed diam eget risus varius blandit sit amet non magna.
Donec id elit non mi porta gravida at eget metus. Cras mattis consectetur purus sit amet fermentum. Sed posuere consectetur est at lobortis.
Example Search Filter
- Apple
- Banana
- Cherry
- Date
- Elderberry
- Fig
- Grape
- Honeydew
- Kiwi
Example Tabs
Content for Tab 1
This is the content shown when Tab 1 is active.
Example Toggle Switch
This is a standard checkbox styled to look like a toggle switch.
Its ARIA role and state (`aria-checked`) are managed by JavaScript.