Question

Do we always need to enclose raw text within quotes("") in any text elements such as

within the HTML body? Or where exactly do we need to use quotes for text?

2 Likes

… we never use quotes as everything within tags is text, which is what a string denotes in a dataset. An HTML document is a single piece of data, so you can get that it is all raw text. The MIME type is, "text/html".

Where quotes are most useful, and hopefully a strict habit is around HTML attributes.

<img src="#">

The value of the src attribute is in double quotes, preferred. Any quotes perferred, also. Us old timers tend to use double on all attributes and take special care in our generated HTML that this is the outcome in the response document sent back to the client. That’s a whole 'nother story, now, isn’t it?

3 Likes

Yes it is😀Thanks for the clarification.

3 Likes