Entities in HTML
HTML entities are special characters that represent characters that are not directly printable, such as the copyright symbol (©), the registered trademark symbol (®), the degree symbol (°), and so on. To insert an HTML entity in an HTML document, you use the format XXXX; where XXXX is the hexadecimal code for the character.
How to use Entities
< for <
> for >
& for &
for a non-breaking space
© for ©
Code tag in HTML
The code tag is used to display computer code. It is typically
displayed in a monospaced font.
Example:
<html><body>Hello, World!</body></html>
Pre tag in HTML
A preformatted text is displayed in a fixed-width font, and it preserves
all spaces and line breaks. It is commonly used for displaying source code,
configuration files, and other text that should not be interpreted as
HTML.
Pre tag with Code tag
<html>
<body>
Hello, World!
</body>
</html>
< for <
> for >
& for &
for a non-breaking space
© for ©
Here is HTML Boilerplate Code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<header></header>
<main></main>
<footer><footer>
<h1></h1>
<h2></h2>
<h3></h3>
<h4></h4>
<h5></h5>
<h6></h6>
<p></p>
</body>
</html>
Want to Learn more about Miscellaneous Tags Go there:
Code Tag (click me)
Global Attributes (click me)
Obsolete HTML Tags (click me)
Character Sets (click me)
Many More Tags (click me)
Why Use Canvas?
Here are some reasons why you might use the canvas element:
Graphics:
For drawing shapes, graphs, and other visual representations.
Dynamic Content:
To dynamically update visual elements.
Interactivity:
Though this involves JavaScript, the canvas element is the foundation for interactive graphical content.HTML Quotation Tag
The use of quotations is common in textual content. HTML provides specific tags to handle this: <blockquote> for block quotations and <q> for inline quotations. In this blog, we'll explore these tags, their attributes, and how to style them.
What Are <blockquote> and <q> Tags?
The <blockquote> and <q> tags serve to define quotations in HTML. While <blockquote> is used for longer, block-level quotes, <q> is used for shorter, inline quotes.
Why Use These Tags?
They provide semantic meaning to your quotations, making it easier for search engines to understand the context and relevance of the content.
Basic Syntax
<blockquote>
Quotation text here.
<q>
Quotation text here.
Attributes
Both <blockquote> and <q> tags support the cite attribute:
cite: Specifies the URL of the quote's source.
Practical Example
Using <blockquote> for long Quotes
This is a long quote from an external source. This quote can span multiple lines and paragraphs.
Using <q> for Short, Inline Quotes
The philosopher said,
The unexamined life is not worth living.
Styling with CSS
You can style these tags using CSS to better match the aesthetics of your website.
Conclusion
The <blockquote> and <q>tags are essential for semantically marking up quotations in HTML. They provide both readability and SEO benefits. Understanding how to use these tags effectively can add more depth and clarity to your web content.