Can I programmatically undock the HTML Viewer opened by the "web" function in MATLAB R2025b?

13 views (last 30 days)
In MATLAB R2025b, calling the "web" function with a local HTML file opens the content inside a docked tab within the MATLAB environment. In older versions, this would often launch in a separate, undocked browser window.
Is there a way to programmatically undock the HTML Viewer or prevent it from affecting the layout of the MATLAB desktop?
To reproduce this observation, follow these steps:
1. In MATLAB R2025b, run:
>> web('C:\Path\To\AnyLocalHTMLFile.html')
2. The file will open in a docked HTML Viewer tab, adjusting the layout of the MATLAB desktop.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 9 Jan 2026 at 0:00
Starting in release version R2025a, MATLAB has replaced the internal Web Browser with a new HTML Viewer for displaying local and internal HTML content. As a result, when you call the "web" function with a local file, the page now opens in a docked tab within the MATLAB desktop, rather than in a separate window as in earlier versions.
Currently, the HTML Viewer does not support programmatic undocking.
To avoid this and preserve your layout, you can use the "-browser" option to open the file in your system’s default web browser instead:
>> web('C:\Path\To\AnyLocalHTMLFile.html', '-browser');
This will open the content externally, without affecting the MATLAB interface.

More Answers (0)

Products


Release

R2025b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!