Help:HTML in wikitext: Difference between revisions

Content deleted Content added
mNo edit summary
Tags: Visual edit Mobile edit Mobile web edit
Reverted 1 edit by Shaybody89 (talk): Please explain your deletions. (TW)
Line 16:
[[HTML attribute]]s provide additional information about an element and are always specified in the start tag. They are formatted as a name/value pair like <code>name="value"</code>.
 
Global attributes apply to all tags. Attributes not listed here are not allowed by MediaWikMediaWiki{{r|sanitizer}}:
* <code>class</code>: one or more classifications to which the element belongs. See [[Wikipedia:Catalogue of CSS classes]].
* <code>dir</code>: text direction— <code>"ltr"</code> (left-to-right), <code>"rtl"</code> (right-to-left) or <code>"auto"</code>.
* <code>id</code>: unique identifier for the element.
Line 40 ⟶ 41:
-->
Other tags such as {{tag|table|o}} support specific attributes – these are listed in the appropriate section.
 
{{markup
|<nowiki>This is <span style="color:red;">red</span> text.</nowiki>
|2=This is <span style="color:red;">red</span> text.
}}
 
The MediaWiki {{sanitizer.php}} does some cleanup on attributes. A best practice is to use the proper syntax.