+ 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)

13th Oct 2020, 10:10 AM
Ayush Singh
Ayush Singh - avatar
62 Réponses
+ 12
Ayush Singh see this code. I hope you can find your answer https://code.sololearn.com/W0D9L2zVdCih/?ref=app
13th Oct 2020, 10:43 AM
Yogeshwaran P
Yogeshwaran P - avatar
+ 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
13th Oct 2020, 2:40 PM
Saifeddine_boughanmi
Saifeddine_boughanmi - avatar
+ 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!
27th Oct 2020, 9:10 AM
El Roy Situmorang
+ 2
Yes😅
13th Oct 2020, 10:13 AM
Ayush Singh
Ayush Singh - avatar
+ 2
Thnx
13th Oct 2020, 10:46 AM
Ayush Singh
Ayush Singh - avatar
+ 2
You are welcome Ayush Singh
13th Oct 2020, 10:47 AM
Yogeshwaran P
Yogeshwaran P - avatar
+ 2
You can by using css.
14th Oct 2020, 9:28 AM
Samira
Samira - avatar
+ 2
Ayush Singh No you can't set border to a letter in html and css. You should use Svg or Javascript
15th Oct 2020, 6:11 AM
Muhammadamin
Muhammadamin - avatar
+ 1
What is boeder Ayush Singh ? you mean *Border*.....!
13th Oct 2020, 10:12 AM
Yogeshwaran P
Yogeshwaran P - avatar
+ 1
Can you briefly define your question?😅 Because I don't know, why you want to add a border to a letter.
13th Oct 2020, 10:15 AM
Yogeshwaran P
Yogeshwaran P - avatar
+ 1
Well Ayush Singh you can change your background colour to other colours.Not white <body bgcolor = "some colour">
13th Oct 2020, 10:21 AM
Yogeshwaran P
Yogeshwaran P - avatar
+ 1
Sorry Ayush Singh .I made mistake while mentioning name...😅
13th Oct 2020, 10:23 AM
Yogeshwaran P
Yogeshwaran P - avatar
+ 1
You are welcome Ayush Singh 🙌👍
13th Oct 2020, 10:24 AM
Yogeshwaran P
Yogeshwaran P - avatar
+ 1
It's ok
13th Oct 2020, 10:25 AM
Ayush Singh
Ayush Singh - avatar
+ 1
Ayush Singh did you mean,you want to make the Letters bold.isn't? Am I right?
13th Oct 2020, 10:27 AM
Yogeshwaran P
Yogeshwaran P - avatar
+ 1
Yes but i want to add a border to any letter like this "🅰️"
13th Oct 2020, 10:36 AM
Ayush Singh
Ayush Singh - avatar
13th Oct 2020, 10:50 AM
Yogeshwaran P
Yogeshwaran P - avatar
+ 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
14th Oct 2020, 7:14 PM
Janning⭐
Janning⭐ - avatar
+ 1
Through CSS you can apply border
15th Oct 2020, 5:04 AM
Spectrum
Spectrum - avatar
+ 1
Have you thought about a drop Shadow? Or even duplicate the text in SVG in multiple colors
15th Oct 2020, 5:26 AM
::sк::
::sк:: - avatar