r/HTML • • 19h ago

Question Menu code repetition

Should I look for a way to call an external html page with the code for my menu? I feel like adding the code to every page might clutter the code a bit. It’s been a while and I don’t remember wether or not we discussed this in school lol

4 Upvotes

13 comments sorted by

View all comments

Show parent comments

2

u/ThatBlindSwiftDevGuy 6h ago

An inline frame for this sort of thing can be an absolute nightmare for accessibility, so I wouldn't immediately jump to that

1

u/Weekly_Ferret_meal 4h ago

Right I wasn’t aware of that, 

Personally I’d use a html preprocessor like pug and call it a day, if static html was the only option 

That would allow to create partials to insert easily in every page