
You can define a simple HTML fragment like this:
<div data-sap-ui-type="sap.m.Button" data-press="doSomething" data-text="Hello
World"></div>The fragment is stored as …/my/useful/UiPartZ.fragment.html and referenced as Fragment my.useful.UiPartZ.
The syntax is the same as in HTMLviews, but the <template> tag that is normally present in HTML views is not used in fragments. Like other fragment types, HTML fragments cannot specify a controller to be instantiated. They can use a controller for binding event handler methods, but only if the code instantiating them passes a controller.