It doesn’t really have to do with outputting program/computer generated content, like say printing a JS executed console.log() message to the page. But is more about the semantic and visual representation of a sample or quoted output.
The samp element represents sample or quoted output from another program or computing system.
Like in the example given in the spec, here the command to run is in the <code> element and the output you would get from running the code is in the <samp> element.
The <code> element is a container to hold written code. The <samp> is a container to hold what might be the output of some code or program if it had been run.
They are not containers to output actual running code coming from a script or program.
If you need an element which will serve as a container for output generated by your website or app’s JavaScript code, you should instead use the <output> element.
There is no code or “sample (or quoted) output from a computer program” in the examples you gave.
I guess technically if that is an output coming from a script.
But, I’m not sure that is how you want to use it for your use case. If you just need to let the user know what information they filled in for a form submit, you can just use a <p> element or something equivalent.
Well I got it! I think just still see output “results of a calculation or the outcome of a user action.” is also comes out from user action. Not? I mean the filled data so I try to not make with p tag because many use of them. Just try all! Thanks!
Off course you have a lot of paragraph elements, it is the main container used for holding text. There is nothing wrong or strange about that. There is really no reason to go out of your way not to use paragraphs when putting text on the page.
Sure the output element can be used to show “a calculation or user action” but I’m not really sure how you are using it serves that purpose. It makes more sense in the context given in the example where you have a slider and its value is output to the page.