Help:HTML in wikitext: Difference between revisions

Content deleted Content added
m Reverted edits by 45.112.177.77 (talk): editing tests (HG) (3.3.0)
mNo edit summary
Tags: Visual edit Mobile edit Mobile web edit
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 MediaWikiMediaWik{{r|sanitizer}}<code>class</code>: one or more classifications to which the element belongs. See [[Wikipedia:Catalogue of CSS classes]].
* <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 41 ⟶ 40:
-->
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.