How to insert a class such as p class="bold" ?

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
Post Reply
davidhelp
Posts: 31
Joined: Thu Jul 15, 2021 6:04 am

How to insert a class such as p class="bold" ?

Post by davidhelp »

How to insert using the toolbar other then manually typing in the <p class="bold"> ?
I can insert the <p> </p>with a button on the toolbar.
Such as highlight the text and right click to see the css options to choose from such as the one below.

<p class="bold"> bold text </p>


<head>
<style>
.bold { font-weight: 600;
font-family: "open sans", sans-serif;
color: #000000; }
</style>
</head>
User avatar
Aivars
Blumentals Software Developer
Posts: 2474
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: How to insert a class such as p class="bold" ?

Post by Aivars »

The way to do it with minimal typing is this: write space after <p, wait for auto-complete, doubleclick on "class", wait for autocomplete, doubleclick on the class name. I'm including the screenshots.

Step 1:
Ekrānuzņēmums 2025-12-03 143724.png
Ekrānuzņēmums 2025-12-03 143724.png (44.08 KiB) Viewed 12 times
double click class

Step 2:
Ekrānuzņēmums 2025-12-03 143812.png
Ekrānuzņēmums 2025-12-03 143812.png (53.65 KiB) Viewed 12 times
double click your class (inline classes may be after the project classes if they are not yet added to project)
Blumentals Software Programmer
davidhelp
Posts: 31
Joined: Thu Jul 15, 2021 6:04 am

Re: How to insert a class such as p class="bold" ?

Post by davidhelp »

Thanks for your reply. It looks to have at least 3 different ways of getting the code inserted.
I received this response by email from a co-worker of yours:

HTMLPad offers several ways to define and reuse code. One option is to use the Library feature; you can find more details in the online documentation: https://help.blumentals.net/htmlpad/reu ... ibrary.htm

For this particular case, I recommend using the Inspector panel, which displays all HTML attributes and lets you easily select a class. See the attached video. https://tinyurl.com/5y5279e3

You can enable the Inspector panel from the main menu by choosing View > Inspector. After inserting the paragraph, make sure your cursor is placed inside the opening tag, between the brackets, for the Inspector to display the attributes correctly.

Please let me know if I can be of further assistance.

Kind regards,
Nikolay Dutchuk

--------------------------------------------

I responded back:

Hello
Thanks, that was the answer I was looking for.
I also used the Library with the how to's from your link to add the code snippets I want like <span class="red or bold"> text </span...
I highlight the text and then double click on the snippet in the Library so the tags wrap around the text.

Before I had closed the Library and the Code Explorer panels.... so did not see want was already there to use.
Nice video tutorial too.

Thanks again.
User avatar
Aivars
Blumentals Software Developer
Posts: 2474
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: How to insert a class such as p class="bold" ?

Post by Aivars »

Indeed, inspector is another great way to do it.
Blumentals Software Programmer
Post Reply