Home BLOGGER SCRIPT How Can You Create/ Add HTML Entities Convertor Tool for Blogger in...

How Can You Create/ Add HTML Entities Convertor Tool for Blogger in 2023?

15262

What is HTML Entities In 2023?

 
HTML entities are a way to represent special characters and symbols in HTML documents. In 2023, HTML entities remain an essential part of web development, used to display characters that have special meanings in HTML or characters that may not render correctly due to encoding issues.
 
For example, the “<” entity represents the less-than sign (<), and “©” represents the copyright symbol ©. HTML entities are particularly useful when dealing with non-ASCII characters, emojis, or mathematical symbols.
 
They ensure that these characters are displayed correctly across different browsers and devices. HTML entities are still relevant for maintaining compatibility, accessibility, and proper rendering of web content in 2023.

What is the Benefits of HTML entities Convertor Tool ?

The HTML Entities Converter Tool offers several benefits for web developers and content creators:
 
1. Character Encoding and Compatibility: HTML entities ensure that special characters, symbols, and non-ASCII characters display correctly across different web browsers and devices. Using a converter tool helps maintain compatibility and consistency.
 
2. Accessibility: HTML entities can improve the accessibility of web content. By correctly encoding special characters, you ensure that screen readers and assistive technologies can interpret and convey the content effectively to users with disabilities.
 
3. Avoid Syntax Errors: HTML entities prevent syntax errors in your HTML documents. Characters like “<” or “&” have special meanings in HTML, and using their corresponding entities prevents issues with rendering and parsing.
 
4. Multilingual Support: HTML entities are particularly useful for displaying characters from various languages and writing systems, as well as special symbols and mathematical notations. Converter tools make it easier to work with multilingual content.
 
5. Security: Using HTML entities can also help prevent cross-site scripting (XSS) attacks by encoding user-generated or dynamic content to ensure it’s treated as plain text, rather than interpreted as code.
 
6. Simplifies Content Creation: Converter tools simplify the process of working with HTML entities. Instead of manually looking up and entering entities, you can quickly convert characters within your text, saving time and reducing errors.
 
7. Better Code Maintenance: Using entities in your code makes it more readable and maintainable, as developers can easily identify special characters and their intended meanings.
 
8. Online Accessibility: Many HTML entities converter tools are available online for free, making them easily accessible and convenient for developers and content creators.
 
Overall, HTML entities converter tools are essential for ensuring proper character encoding, web compatibility, accessibility, and a smooth development process. They help you create web content that is both functional and user-friendly.

How to Put HTML entities Convertor Tool in Blogger in 2023?

To put an HTML Entities Converter Tool in a Blogger post in 2023, you can use an HTML iframe to embed an external converter tool or create a custom widget. Here’s are some step by step guide for both methods:
 
 

Method 1: Embed an External Converter Tool using an HTML iframe:

 
1. Find an online HTML Entities Converter Tool that you want to use. There are many Code available on Internet Check Wheather You Like To Use That Or Mine.
 
2. In your Blogger dashboard, create a new post or edit an existing one.
 
3. In the post editor, switch to HTML mode (click on “HTML” or “Compose” at the top left of the editor).
 
4. Insert an iframe HTML code that points to the converter tool.
 
5. Switch back to the “Compose” mode to see the embedded tool within your post.
 
6. Adjust the width and height attributes in the iframe code to fit your post’s layout and preferences.
 
7. Save or publish your blog post.

Method 2:

 
Create a Custom Widget with HTML Entities Converter:
 
1. Find or create an HTML Entities Converter tool as a standalone webpage.
 
2. In your Blogger dashboard, go to the “Layout” section.
 
3. Click on “Add a Gadget” where you want to place the converter tool, like in the sidebar or footer.
 
4. In the gadget selection window, choose the “HTML/Javascript” gadget.
 
5. In the content box, paste the HTML code for the converter tool.
 
6. Save the gadget configuration.
 
7. Save your layout changes.
 
8. The HTML Entities Converter Tool should now be visible in your Blogger layout where you placed the widget.

 Method – 1 CSS Code:

<style>
.html-entities-converter {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: "Roboto", sans-serif;
}

.html-entities-converter h2 {
  font-size: 32px;
  text-transform: uppercase;
  font-weight: 900;
  text-align: center;
  color: #023047;
  margin: 16px;
}

.html-entities-converter .input-text,
.html-entities-converter .result {
  height: 180px;
  padding: 16px;
  font-family: "Roboto", sans-serif;
  font-size: 18px;
  line-height: 1.7;
}

.html-entities-converter .input-text {
  resize: none;
}

.html-entities-converter .result {
  overflow-y: scroll;
}

.html-entities-converter .convert-btn {
  background: #023047;
  border: none;
  color: #fff;
  padding: 10px;
  text-transform: uppercase;
  font-size: 16px;
  cursor: pointer;
  letter-spacing: 4px;
}

.html-entities-converter .copy-code-btn svg {
  width: 24px;
  cursor: pointer;
}

.html-entities-converter .result-outer {
  background: #bde0fe;
  position: relative;
}

.html-entities-converter .copy-code-btn {
  position: absolute;
  top: 10px;
  right: 10px;
}

.html-entities-converter .notification {
  position: fixed;
  bottom: 0px;
  left: 50%;
  transform: translate(-50%, 50px);
  background: #000;
  color: #fff;
  padding: 10px 32px;
  border-radius: 24px;
  transition: all 400ms ease;
}

.html-entities-converter .notification.active {
  transform: translate(-50%, -30px);
}
</Style>

 Method 2 – JS CODE:

<script>
const inputText = document.querySelector(
  ".html-entities-converter .input-text"
);
const convertBtn = document.querySelector(
  ".html-entities-converter .convert-btn"
);
const result = document.querySelector(".html-entities-converter .result");
const copyCodeBtn = document.querySelector(
  ".html-entities-converter .copy-code-btn"
);
const notification = document.querySelector(
  ".html-entities-converter .notification"
);

const characters = {
  "<": "&lt;",
  ">": "&gt;",
  "&": "&amp;",
  '"': "&quot;",
};

const convertEntities = (str) => {
  return str.replace(/[<>&"]/g, function (c) {
    return characters[c];
  });
};

convertBtn.addEventListener("click", () => {
  let input = inputText.value;
  let resultText = convertEntities(input);
  result.innerText = resultText;
});

const displayNotification = () => {
  notification.classList.add("active");
  setTimeout(() => {
    notification.classList.remove("active");
  }, 3000);
};

copyCodeBtn.addEventListener("click", () => {
  let toCopy = result.innerText;
  navigator.clipboard.writeText(toCopy).then(() => {
    displayNotification();
  });
});
</script>

 Method- 3 HTML CODE:

<div class="html-entities-converter">
      <h2>HTML Entities Converter</h2>
      <textarea class="input-text"></textarea>
      <button class="convert-btn">Convert</button>
      <div class="result-outer">
        <div class="notification">Code copied to the clipboard!</div>
        <div class="copy-code-btn">
          <svg
            xmlns="http://www.w3.org/2000/svg"
            fill="none"
            viewBox="0 0 24 24"
            stroke-width="1.5"
            stroke="currentColor"
            class="w-6 h-6"
          >
            <path
              stroke-linecap="round"
              stroke-linejoin="round"
              d="M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 01-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 011.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 00-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 01-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 00-3.375-3.375h-1.5a1.125 1.125 0 01-1.125-1.125v-1.5a3.375 3.375 0 00-3.375-3.375H9.75"
            />
          </svg>
        </div>
        <div class="result"></div>
      </div>
    </div>

    <script src="main.js"></script>
 •  After Pasted the Code Publish the Code

Summary:

 
In 2023, you can create or add an HTML Entities Converter Tool to your Blogger blog using two primary methods:
 
1. Embed an External Converter Tool using an HTML iframe:
 
   – Find an online HTML Entities Converter Tool.
 
   – In the Blogger post editor, switch to HTML mode.
 
   – Insert an iframe HTML code that points to the converter tool, specifying the source URL and dimensions.
 
   – Switch back to the “Compose” mode to see the embedded tool within your post.
 
   – Adjust the dimensions to fit your post layout.
 
   – Save it or publish your post /Blog.
 
2. Create a Custom Widget with HTML Entities Converter:
   – Find or create an HTML Entities Converter tool as a standalone webpage.
 
   – Access the Blogger dashboard and navigate to the “Layout” section.
 
   – Add a “HTML/Javascript” gadget where you want the tool to appear (e.g., sidebar or footer).
 
   – Paste the HTML code for the converter tool into the gadget’s content box.
 
   – Save the gadget configuration and your layout changes.
 
These methods enable you to incorporate an HTML Entities Converter Tool into your Blogger blog, making it easier for you and your readers to work with special characters, symbols, and ensure proper character encoding, compatibility, and accessibility in your content. This can enhance the quality and functionality of your blog posts in 2023.

LEAVE A REPLY

Please enter your comment!
Please enter your name here