Storing partial HTML elements in separate files?

As a learning experience, I’ve been working on a side bar for a website I am creating with just HTML, CSS, and JavaScript.

I want to display a different side menu depending on what icon the user clicks on. This morning I added the hover highlighting …


This content originally appeared on DEV Community and was authored by Marcos_

As a learning experience, I've been working on a side bar for a website I am creating with just HTML, CSS, and JavaScript.

I want to display a different side menu depending on what icon the user clicks on. This morning I added the hover highlighting and the click functionality to expand the side bar. However I want to render some new

elements to the space that the side bar creates.

What is the best practice in this case? My non-webdev instincts tell me to separate out the html into different files for readability.


This content originally appeared on DEV Community and was authored by Marcos_


Print Share Comment Cite Upload Translate Updates
APA

Marcos_ | Sciencx (2024-07-04T10:37:44+00:00) Storing partial HTML elements in separate files?. Retrieved from https://www.scien.cx/2024/07/04/storing-partial-html-elements-in-separate-files/

MLA
" » Storing partial HTML elements in separate files?." Marcos_ | Sciencx - Thursday July 4, 2024, https://www.scien.cx/2024/07/04/storing-partial-html-elements-in-separate-files/
HARVARD
Marcos_ | Sciencx Thursday July 4, 2024 » Storing partial HTML elements in separate files?., viewed ,<https://www.scien.cx/2024/07/04/storing-partial-html-elements-in-separate-files/>
VANCOUVER
Marcos_ | Sciencx - » Storing partial HTML elements in separate files?. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/07/04/storing-partial-html-elements-in-separate-files/
CHICAGO
" » Storing partial HTML elements in separate files?." Marcos_ | Sciencx - Accessed . https://www.scien.cx/2024/07/04/storing-partial-html-elements-in-separate-files/
IEEE
" » Storing partial HTML elements in separate files?." Marcos_ | Sciencx [Online]. Available: https://www.scien.cx/2024/07/04/storing-partial-html-elements-in-separate-files/. [Accessed: ]
rf:citation
» Storing partial HTML elements in separate files? | Marcos_ | Sciencx | https://www.scien.cx/2024/07/04/storing-partial-html-elements-in-separate-files/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.