Jump to content

Help talk:HTML in wikitext

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Merge from WP:Span tags

[edit]

Seems there was consensus at Wikipedia:Miscellany for deletion/Wikipedia:Span tags to merge that content into here if someone wants to take up the task. -- œ 12:21, 22 March 2010 (UTC)[reply]

<br> vs. <br /> vs. </br>. (One concept inserted in the middle of another doesn't help.)

[edit]

These sentences must confuse many readers.
"<br> or <br /> inserts a line break. Both versions of the break are supported by HTML5. </br> is invalid. Using <br> without the / breaks syntax highlighting, so should be avoided."

The last sentence should follow the first two. This will be more easily understood.
"<br> or <br /> inserts a line break. Both versions of the break are supported by HTML5. Using <br> without the / breaks syntax highlighting, so should be avoided. Use <br>. </br> is invalid. Do not use it." ... PeterEasthope (talk) 15:17, 4 April 2020 (UTC)[reply]

Good call. Changed. – Jonesey95 (talk) 17:05, 4 April 2020 (UTC)[reply]
Shouldn't that be "Use <br />" and not "Use <br>"? The second contradicts the preceding sentence. --Redrose64 🌹 (talk) 22:09, 4 April 2020 (UTC)[reply]
Sorry, I should have linked to a diff. I implemented the proposed change "The last sentence should follow the first two", not the proposed text, which was redundant and internally inconsistent. – Jonesey95 (talk) 03:55, 5 April 2020 (UTC)[reply]

Small tag

[edit]

The reason not to use <small>...</small> is not because it renders differently in browsers (that's true of a lot of tags) but because it has a semantic meaning. See also MOS:SMALL. ―Justin (koavf)TCM 18:56, 29 June 2020 (UTC)[reply]

How to stop wikitext from interfering with HTML

[edit]

I'm attempting to make a live clock with HTML here, but MediaWiki's wikitext keeps messing up the code by using {{}} etc. How can I stop this? (tbh if someone could also help me with the clock it would be much appreciated). — Yours, Berrely • TalkContribs 17:08, 4 July 2020 (UTC)[reply]

Berrely, you can't have full HTML pages in MediaWiki (both for security and WP:NOTWEBHOST reasons) - to achieve what you're trying to do, you can make a user script (where you add all the code between the <script> tags) then on the Wiki page just set it to <span id="txt"></span> Ed6767 talk! 23:22, 4 July 2020 (UTC)[reply]
Ed6767 I actually do know how to make a user script with the time, but what I want to do is put a clock on my user talk so people know what time it is for me, and I'm pretty sure you can't do that without constantly purging the page, and no such thing as an automatic purger exists. 86.18.238.106 (talk) 07:46, 5 July 2020 (UTC)[reply]
Berrely, you can try some userboxes that do the same thing? Ed6767 talk! 13:19, 5 July 2020 (UTC)[reply]
Also you can add a top right-sided clock by going to Special:Preferences#mw-prefsection-gadgets and clicking on "Add a clock to the personal toolbar that displays the current time in UTC and provides a link to purge the current page (documentation)". --Jules (Mrjulesd) 13:58, 5 July 2020 (UTC)[reply]
I am aware of that, but what I want to do is put a live clock on my user page, without having to repeatedly purge it. — Yours, Berrely • TalkContribs 15:47, 5 July 2020 (UTC)[reply]
All existing methods require a purge, other than the gadget mentioned by Mrjulesd. For performance reasons, Wikipedia pages are not updated dynamically. --Redrose64 🌹 (talk) 08:41, 6 July 2020 (UTC)[reply]

Template:Tooltip, Template:Hover_title, and Template:Abbr

[edit]
 – Pointer to relevant discussion elsewhere.

Please see: Wikipedia:Templates for discussion/Log/2020 December 3#Template:Hover title and Template:Tooltip

Summary:

  • {{Abbr}} (a wrapper for <abbr>...</abbr>) has long been abused for non-abbreviation markup (against the HTML specs).
  • We had a template, {{Tooltip}}, with <span>...</span> for non-abbreviation use, but it was "merged" (not really) and redirected to {{Abbr}}.
  • The redir was then deprecated (for the reason mentioned above), but the community ignored the deprecation.
  • In the interim, {{Hover title}} was created to do the same thing, but with backwards parameters (and some additional features).
  • Both the {{Tooltip}} then-redirect and {{Hover title}} template have been transcluded in tens of thousands of articles, mainly via infoboxes and other templates.
  • I created a new {{Tooltip}} template, with all the features of {{Hover title}} but preserving the {{Abbr}} parameter order (to not break deployed translcusions).
  • The TfM linked above would merge away {{Hover title}}, but it's going to require flipping the |1= and |2= parameters of its extant instances.
  • Oh, and the documentation would need updating after merger, of course.

 — SMcCandlish ¢ 😼  00:25, 4 December 2020 (UTC)[reply]

<bdi> tag

[edit]

In viewing §§ bdi, it does not appear to do anything in the example given. The text describes <bdi> in that it isolates the content from the surrounding text-direction settings, but there are no text-direction settings shown for the example to demonstrate. — CJDOS, Sheridan, OR (talk) 22:46, 14 August 2021 (UTC)[reply]

Line breaks. br variants

[edit]

Help:HTML in wikitext#Basic has a section on <br> and variants.

Please see Help talk:Line-break handling#Let us ignore syntax highlighters that do not accept <br>

It is a detailed discussion with participation from editors, developers, admins, etc.. Most people in that thread want <br> used, not <br />.

See also: KISS principle.

See also MOS:MARKUP: "Other things being equal, keep markup simple. This makes wikitext easier to understand and edit, and the results seen by the reader more predictable. Use HTML and CSS markup sparingly." --Timeshifter (talk) 08:49, 11 February 2023 (UTC)[reply]

HTML

[edit]

</button>

Does this create a button according to HTML? Lindo Kabini (talk) 10:32, 7 January 2024 (UTC)[reply]

@Lindo Kabini: No, because it's an end tag, and those do nothing apart from terminating an open element. --Redrose64 🌹 (talk) 17:43, 7 January 2024 (UTC)[reply]
@Redrose64 as for a kid who just learned a little of Python and moved to C++ to learn. All is just confusing 🤯
Is it like this?
<button>message</button> Lindo Kabini (talk) 07:11, 8 January 2024 (UTC)[reply]
@Lindo Kabini: Looks correct. You can learn and test HTML and other things at w3schools, as well as other websites. Try HTML <button> Tag. Jroberson108 (talk) 12:26, 8 January 2024 (UTC)[reply]
is w3schools here on Wikipedia? But you know what, am still learning C++ and HTML is not the ideal language for me Lindo Kabini (talk) 12:30, 8 January 2024 (UTC)[reply]
@Jroberson108 Lindo Kabini (talk) 12:31, 8 January 2024 (UTC)[reply]
@Lindo Kabini: It isn't Wikipedia, just a nice site to learn HTML, if that is what you want to learn. Jroberson108 (talk) 12:39, 8 January 2024 (UTC)[reply]
@Lindo Kabini: It covers C++ too. Like I said, "and other things". Jroberson108 (talk) 12:42, 8 January 2024 (UTC)[reply]
I already learn it at a certain site at YouTube and also here on Wikibooks so do not stress Lindo Kabini (talk) 12:46, 8 January 2024 (UTC)[reply]
@Jroberson108 Lindo Kabini (talk) 12:46, 8 January 2024 (UTC)[reply]
@Lindo Kabini: Please note that this is the talk page for discussing improvements to the page Help:HTML in wikitext, it is not a help desk for how to write HTML. In particular, HTML forms (including the button element) may not be used in Wikipedia, which is why it is not mentioned at Help:HTML in wikitext. --Redrose64 🌹 (talk) 19:47, 8 January 2024 (UTC)[reply]
oh, okay no problem honestly I enjoy using this. ☺️☺️ Lindo Kabini (talk) 06:02, 9 January 2024 (UTC)[reply]