What is a snippet in HTML

Work is made easier with snippets

Recurring actions and objects are often required when creating websites. An example of this would be the inclusion of small pictures including subtitles or references, which are placed next to the main text for illustration purposes.

The combination of image and subtitle suggests integrating both in the form of a table. Since, in addition to the content, only the width may be variable in this table, it is worthwhile to create a module that can be inserted with a click. Such a code snippet is referred to by MSEW as a "snippet". The organization of the snippets takes place in the window at the top right.

Right-clicking on the "HTML" folder opens a dialog in which you can create a new folder, e.g. "Tables". Then the table is first created in the desired form or loaded from an existing file.



In the source code:






In the preview:



Then copy the entire source code of the object to the clipboard.

Right-clicking on the new "Tables" folder in the snippet window opens the "New Snippet" menu. Now the copied source code can be pasted with an appropriate name assignment:

Please note that the insert option "" is only available if the cursor is at the corresponding position in the Source code is placed. All you have to do is double-click on the selected snippet and the code snippet is inserted.