![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML Tag
The q tag in HTML is used to specify a short quotation. The quotation marks get inserted around the text set inside the q tag i.e. the quotation.
Following is the attribute −
cite: It sets the source url of the quote.
Let us now see an example to implement the <q> tag −
Example
<!DOCTYPE html> <html> <body> <h2>Thoughts</h2> <p>Warren Buffett quoted, <q>It's better to hang out with people better than you. Pick out associates whose behavior is better than yours and you'll drift in that direction. </q></p> <p>Bill Gates quoted, <q>Your most unhappy customers are your greatest source of learning.</q></p> </body> </html>
Output
In the above example, we have set some quotes using the <q> tag in HTML −
<p>Warren Buffett quoted, <q>It's better to hang out with people better than you. Pick out associates whose behavior is better than yours and you'll drift in that direction. </q>
As you can see above, we have set the quote using the <q> tag. The output displays the <q> tag automatically adds a short quotation around the quotes.
Advertisements