Help talk:HTML in wikitext
![]() | This help page does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||
|
|
|
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)
<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)
- Good call. Changed. – Jonesey95 (talk) 17:05, 4 April 2020 (UTC)
- Shouldn't that be "Use
<br />
" and not "Use<br>
"? The second contradicts the preceding sentence. --Redrose64 🌹 (talk) 22:09, 4 April 2020 (UTC)- 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)
- Shouldn't that be "Use
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)❤T☮C☺M☯ 18:56, 29 June 2020 (UTC)
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 • Talk∕Contribs 17:08, 4 July 2020 (UTC)
- 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)- 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)
- Berrely, you can try some userboxes that do the same thing? Ed6767 talk! 13:19, 5 July 2020 (UTC)
- 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)
- 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 • Talk∕Contribs 15:47, 5 July 2020 (UTC)
- 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)
- 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 • Talk∕Contribs 15:47, 5 July 2020 (UTC)
- 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)
- Berrely, you can try some userboxes that do the same thing? Ed6767 talk! 13:19, 5 July 2020 (UTC)
- 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)
Template:Tooltip, Template:Hover_title, and Template:Abbr
[edit]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)
<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)
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 />.
![](http://upload.wikimedia.org/wikipedia/commons/thumb/f/f1/Keep_it_Simple.jpg/80px-Keep_it_Simple.jpg)
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)
HTML
[edit]</button>
Does this create a button according to HTML? Lindo Kabini (talk) 10:32, 7 January 2024 (UTC)
- @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)
- @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)
- @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)
- 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)
- @Jroberson108 Lindo Kabini (talk) 12:31, 8 January 2024 (UTC)
- @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)
- @Lindo Kabini: It covers C++ too. Like I said, "and other things". Jroberson108 (talk) 12:42, 8 January 2024 (UTC)
- 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)
- @Jroberson108 Lindo Kabini (talk) 12:46, 8 January 2024 (UTC)
- @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)- oh, okay no problem honestly I enjoy using this. ☺️☺️ Lindo Kabini (talk) 06:02, 9 January 2024 (UTC)
- @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
- @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)