Sword Art Online Wiki
No edit summary
No edit summary
 
Line 6: Line 6:
 
<ref name="refname">[...]</ref></syntaxhighlight> is ''refname''.
 
<ref name="refname">[...]</ref></syntaxhighlight> is ''refname''.
   
Functional it does not make any difference as long as this is one string (meaning one word without spaces). As soon as a space is in that name the quotes are mandatory. For web development it is therefore best practice to always include the quotes, to accomodate for possible name changes in the future to not break scripts and bots and to make processing easier. Whether a space is pre-/appended to the equality sign does not matter either.
+
Functional it does not make any difference as long as this is one word (meaning one word without spaces). As soon as a space is in that name the quotes are mandatory. For web development it is therefore best practice to always include the quotes, to accomodate for possible name changes in the future to not break scripts and bots and to make processing easier. Whether a space is pre-/appended to the equality sign does not matter either.
   
 
<syntaxhighlight lang="html5">
 
<syntaxhighlight lang="html5">

Latest revision as of 20:26, 27 March 2018

Hey,

I'm not sure whether you read my last edit summary:

[...]Don't remove the spaces on class names, it is best practice in webdev to quote even if the name does not have spaces in it.[...]

Thus, I thought I'd use this chance to add some background information. I'm aware that aside from us technical admins not many know the implications of this,so please let me elaborate. When I speak of class names, I mean the part class="name". In the example of the article, the class name in

<ref name="refname">[...]</ref>

is refname.

Functional it does not make any difference as long as this is one word (meaning one word without spaces). As soon as a space is in that name the quotes are mandatory. For web development it is therefore best practice to always include the quotes, to accomodate for possible name changes in the future to not break scripts and bots and to make processing easier. Whether a space is pre-/appended to the equality sign does not matter either.

<ref name="refname" | name = "refname" | name= "refname" | name ="refname"/>

are all eqivalent

You do not need to change this on every single article now, I just wanted to give you some background info why they are included on most articles. I've written this on the assumption you used source mode., to save you the hassle of going over them unnecessarily, because changing them with each edit is really a time consuming process unless you automate this. In which case you should already be aware of this dilemma though :P<ac_metadata title="Removing quotes on references """> </ac_metadata>