the answer (as you’re well aware) is “neither”. Using inline styles is an outdated practice. You should b using the appropriate HTML element with external CSS styling.
You’re getting confused between HTML block/inline elements and CSS display properties.
Whether you choose to use <div> or <span> depends on the structure of your page and the context in which you are using it.
You are making them more confusing than they need to be because you are trying to run before you can walk. You need to take the time and make sure you understand the basic concepts first.
Yet again, go back and reread your thread from yesterday about display values. A <div> is a block element by default and therefore does not require display:block. Please read this:
That’s not correct I’m afraid and shows a lack of understanding.
The display property can be used on any element and it all depends on context as to what property you want to apply to the element concerned.
I explained in the other post where I specifically went into detail about the differences between block elements and the display:block properties (and inline etc). Please re-read the answer if you are not sure.
CSS is about how things look and html is the structure you use.
Spans are inline elements and used for marking up inline fragments.
e.g.
<p>This is a paragraph where I've used a span <span class="highlight">to highlight this text</span></p>
CSS:
.highlight{color:red}
Html expects a structure.
This is very bad html:
<span This is a heading</span><br>
<div>Hello this is really a paragraph<br>and this is another paragpraph</div>
<span> and this is just some more text on another line</span>
You need to think about the content and then apply the correct tag. The above should be marked up like so.
<h1>Main Heading of page</h1>
<p>Hello this is really a paragraph etc. etc ...</p>
<p>This is another paragraph etc... etc..</p>
<p>This is more stuff to read <span>but his part is styled differently using a span</span> because its an inline fragment</p>
<div style" here would be the container, with display:block; and <span style=" would be the heading cause it’s only a small fragment of text. Do I have this right? And if I had a paragraph of text I would use <p style=" instead of span? https://jsfiddle.net/6x8wg27f/
<div style="display:block; width: 256px; height: 330px; cursor: pointer; background-color:#000000;border-radius: 50px; border: 5px solid #0059dd;">
<span style="display:table;margin: auto;font-family: New Times Roman; font-size: 20px;color: #0059dd;position: relative;bottom:-50px;"> [ ENJOY THE MUSIC ]
</span></div>
In your example, neither the text nor the context is shown, so it is up to you to choose the best element based on your knowledge of HTML and experience.
A beginner’s course in HTML/CSS would be the place to start.