I have recently started learning html from w3schools.com. In this example we can add double quotes to any text by using <q>
tag around it. What I wonder is that we can simply add double quotes manually too, e.g.
<q>text quoted</q>
will render just same if we instead add double quotes manually
"text quoted"
- Is there any differnce between these two methods to add double quotes?
The difference is that when you use the <q>
element the software reading the page (a browser, a search engine spider, etc) knows that it's a quotation and might have different processing rules for it: browsers might render it differently, in italics for example, or a different culture's quote symbols (Japan doesn't use quotes, they use right-angle symbols) and search engines could look-up the quote elsewhere and provide a citation. If you don't mark-up your text then none of these scenarios are possible.
This falls under the umbrella term "the semantic web" - it's about markup throughly describing its content's meaning, not just the way it looks.
Also, don't use W3Schools: they have a poor reputation for teaching only the absolute basics required to achieve and end-goal, often with nasty shortcuts and it instills bad habits. Instead I recommend resources like Mozilla Developer Network (MDN) when learning about the web.