Home → HTML/CSS → Create Simple HTML Photo Gallery with JavaScript In this tutorial you will learn how to create a simple and effective html photo gallery using a little JavaScript that you might need for your portfolio or a personal project. Mlightbox is a jQuery image lightbox plugin which displays a gallery of images grouped with Html5 data-gallery attribute in a responsive lightbox. How to use it: 1. Import jQuery library and the jQuery mlightbox plugin's files into your document. So if you've given your image an alt description, or even a long description (using longdesc), those attributes don't have to be affected or changed to add a title for use by Lightbox. In fact, you're encouraged to add alt attributes to your images, anyway, as XHTML requires that attribute for every image on a page.
The makes it easy to globally add a responsive lightbox in WordPress to your images, complete with lightbox theme and color choices. With the release of FooBox 2.0, you can now add lightboxes to individual video and HTML elements as well.

But what if you want add different lightbox WordPress styles to different image, video, and HTML? Read below to find out how to accomplish this. All you need to do is add some data attributes to your anchor links: data-style=”fbx-metro” Sets the modal style to be Metro.