Help:Advanced formatting of wiki pages: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
Xenwolf (talk | contribs)
ArrowHead294 (talk | contribs)
mNo edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[CSS]] and [[JavaScript]] is generally involved in MediaWiki-based Wikis. But while inline CSS is permitted, inline JavaScript is not available.  
{{Wikipedia|CSS|JavaScript}}
CSS (Cascading Style Sheets) and [[JavaScript]] are generally involved in MediaWiki-based wikis. But while inline CSS is permitted, inline JavaScript is not available.  


Most HTML tags for example <code>tt</code>, <code>code</code>, <code>pre</code>, <code>div</code>, <code>span</code> etc. can be directly embedded in the Wiki markup, some HTML tags (for example <code>a</code> or <code>img</code>) can not. For the allowed tags, you can define inline-CSS by setting the <code>style</code> attribute for instance <code><nowiki><span style="border: 1px solid grey; padding: 0 1em">framed sometext</span></nowiki></code> which is rendered like this <span style="border: 1px solid grey; padding: 0 1em">framed sometext</span>.
Most HTML tags, such as <code>code</code>, <code>pre</code>, <code>div</code>, <code>span</code>, etc., can be directly embedded in the wiki markup; some HTML tags (for example <code>a</code> or <code>img</code>) cannot. For the allowed tags, you can define inline CSS by setting the <code>style</code> attribute, for instance <code><nowiki><span style="border: 1px solid grey; padding: 0 1em">framed sometext</span></nowiki></code>, which is rendered like this: <span style="border: 1px solid grey; padding: 0 1em">framed sometext</span>.


User-defined CSS and JavaScript is enabled for the XenWiki. If your personal solutions turn out to be useful for the overall wiki, it will potentially integrated into the site-wide styles or scripts.
User-defined CSS and JavaScript are enabled on the Xenharmonic Wiki. If your personal solutions turn out to be useful for the overall wiki, they might be integrated into the site-wide styles or scripts.
* <code>[[Special:MyPage/common.css|User:''YourName''/common.css]]</code>
* <code>[[Special:MyPage/common.css|User:''YourName''/common.css]]</code>
* <code>[[Special:MyPage/common.js|User:''YourName''/common.js]]</code>
* <code>[[Special:MyPage/common.js|User:''YourName''/common.js]]</code>


Use the [[SandBox]] for experimentation or start a page in the user namespace, IOW as a subpage of your user page, for example <code>[[Special:MyPage/Sandbox|User:''YourName''/Sandbox]]</code>.
Use the [[SandBox]] for experimentation or start a page in the user namespace, in other words as a subpage of your user page, for example <code>[[Special:MyPage/Sandbox|User:''YourName''/Sandbox]]</code>.


== See also ==
== See also ==
Line 15: Line 16:


== External links ==
== External links ==
* [https://de.wikipedia.org/wiki/Cascading_Style_Sheets Cascading Style Sheets – Wikipedia]
* [[MediaWikiWiki: Manual:CSS]]
* [https://www.w3schools.com/css/ CSS Tutorial]
* [https://www.w3schools.com/css/ W3Schools — CSS Tutorial]
* [https://en.wikipedia.org/wiki/JavaScript JavaScript &#45; Wikipedia]
* [[MediaWikiWiki: JavaScript]]
* [https://www.mediawiki.org/wiki/Gadget_kitchen Gadget kitchen &#45; MediaWiki]
* [[MediaWikiWiki: Gadget kitchen]]
* [https://www.mediawiki.org/wiki/Learning_JavaScript Learning JavaScript &#45; MediaWiki]
* [[MediaWikiWiki: Learning JavaScript]]


[[Category:wiki_help]]
[[Category:Help]]

Latest revision as of 15:17, 23 February 2025

English Wikipedia has articles on:

CSS (Cascading Style Sheets) and JavaScript are generally involved in MediaWiki-based wikis. But while inline CSS is permitted, inline JavaScript is not available.

Most HTML tags, such as code, pre, div, span, etc., can be directly embedded in the wiki markup; some HTML tags (for example a or img) cannot. For the allowed tags, you can define inline CSS by setting the style attribute, for instance <span style="border: 1px solid grey; padding: 0 1em">framed sometext</span>, which is rendered like this: framed sometext.

User-defined CSS and JavaScript are enabled on the Xenharmonic Wiki. If your personal solutions turn out to be useful for the overall wiki, they might be integrated into the site-wide styles or scripts.

Use the SandBox for experimentation or start a page in the user namespace, in other words as a subpage of your user page, for example User:YourName/Sandbox.

See also

External links