G
G
GrimmAS2017-04-24 03:20:03
JavaScript
GrimmAS, 2017-04-24 03:20:03

Why is it customary to use dashes to separate words?

I climbed the frameworks and looked at someone else's code. Everyone uses a dash for those cases when there are logically two words, but there should be one in the code.
Why exactly? Why not use underscore?
Was it just accepted, or is there a functional justification?
I just remembered when I downloaded music from different sites quite small and there was often "Name_of_This Song_Here_Such_Here"
Then I decided for myself that the underscore is used for this to separate words without a space. This is not true?
Well, once I mentioned it, then in pursuit of the second stupid question:
Why did they remove spaces from song titles in those days? Replacing Cyrillic with Latin is still understandable, but why remove spaces?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel, 2017-04-24
@GrimmAS

Regarding the first:
Imagine that you have two links on the page, and they should be displayed in full:
mysite.com/super-puper-mega-url
and
mysite.com/other_super_puper_mega_url
and these two links have the style - "text-decoration: underline";
which of these two links will be more readable?
https://codepen.io/anon/pen/dWpyNW

Z
zooks, 2017-04-24
@zooks

Not a dash, but a hyphen. In order to be compatible with different systems, not only Windows.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question