[[html()]]
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
en:create:functions:html [09.03.2022 11:05] – [Example] ruth.noppeneyen:create:functions:html [09.03.2022 11:13] – [Example] ruth.noppeney
Line 17: Line 17:
 '); ');
 </code> </code>
 +
 +===== HTML-Code and other elements =====
 +
 +Other elements -- especially questions and text elements -- also generate HTML code. You can use ''html()'' to add more HTML code before and after these elements. This allows you, for example, to embed a question in another HTML element in order to change the width.
 +
 +The following PHP code displays the question AB01 centered in a block with a maximum width of 600 pixels. 
 +
 +<code php>
 + html('<div style="max-width: 600px; margin: 0 auto;">');
 + question('AB01');
 + html('</div>');
 + </code>
 +
 +You can find an application within the instructions for [[:en:create:table-layout]].
 +
  
 ===== Tips ===== ===== Tips =====
en/create/functions/html.txt · Last modified: 09.03.2022 15:48 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki