+ 5
[How] Can I add a border to a letter in html?
'https://code.sololearn.com/Wga6g941xq9X/?ref=app. This is my code. See it. I want to give color of indian flag to india written in the code. Bt after that I can't see "i" in India bcos of white color.' 'Yes but i want to add a border to any letter like this "🅰️" ' (we're assuming no CSS at this point) (we're discovering that maybe Ayush meant background color instead of border)
62 Respostas
+ 12
Ayush Singh see this code.
I hope you can find your answer
https://code.sololearn.com/W0D9L2zVdCih/?ref=app
+ 7
Hi Friend you can do that :
<span>d</span>
And add this to the CSS code :
Span{background-color:black; border-radius:100%;}
:D
+ 4
Yogeshwaran you are using text background color.. so it's wrong..
Ayush Singh try to use text-shadow or text-stroke in your css code and experiment with it..
It will help much..
In text-shadow they have h-shadow, v-shadow, blur-radius, and conditional value such: color, none, initial, or inherit.
Explanation:
h-shadow: Set the horizontal position of the shadow
v-shadow: Set the vertical position of the shadow
blur-radius: Set the blur size for the shadow
Color: If you want to use color, use css color code such rgb(), hexa-decimal color, or cmyk(), etc.
None: If you don't want to set anything..
Initial: Use the default shadow style
Inherit: Use the inheritance style from it's parent values
If you try to use text-stroke..
You can only set it size(width) and then it's color..
Cuz this css syntax is still in experimental try to use -webkit- prefix.
Example:
-webkit-text-stroke-width: 1px;
-webkit-text-stroke-color: red;
If you want for more go to this link below:
https://geeksforgeeks.org/css-font-border/
Thx!
+ 2
Yes😅
+ 2
Thnx
+ 2
You are welcome Ayush Singh
+ 2
You can by using css.
+ 2
Ayush Singh No you can't set border to a letter in html and css.
You should use Svg or Javascript
+ 1
What is boeder Ayush Singh ?
you mean *Border*.....!
+ 1
Can you briefly define your question?😅 Because I don't know, why you want to add a border to a letter.
+ 1
Well Ayush Singh you can change your background colour to other colours.Not white
<body bgcolor = "some colour">
+ 1
Sorry Ayush Singh .I made mistake while mentioning name...😅
+ 1
You are welcome Ayush Singh 🙌👍
+ 1
It's ok
+ 1
Ayush Singh did you mean,you want to make the Letters bold.isn't?
Am I right?
+ 1
Yes but i want to add a border to any letter like this "🅰️"
+ 1
Yes Ayush Singh
+ 1
Ayush Singh
Here's a summary of the formatting/stylistic options available in pure HTML (i.e. no CSS):
https://stackoverflow.com/a/21951731
There used to be a hacky way of using the bordercolor attribute on table cells, but that functionality has been deprecated.
In the meantime, since the replies to this thread are getting a little spammy, I'm going to tweak your post a little bit to discourage random people from saying random things.
Happy coding!
--Janning⭐
SoloLearn Platinum Moderator
+ 1
Through CSS you can apply border
+ 1
Have you thought about a drop Shadow? Or even duplicate the text in SVG in multiple colors