I didn’t do HTML and CSS for some time, so I can forget something, but for some reason the “style” tag with the set of text-align properties does not work even in the simplest context. I am going to show you the whole, whole file that I have, but my problem is only in the two comments that I have. Do not worry about other things; this is for a small passion project I'm working on.
So, here is the whole file. I have many things that are not relevant and not important; just focus on the code in two comments.
<!doctype html> <html> <head> <meta charset="utf-8"/> <title>JSON Generator</title> <link rel="stylesheet" href="web_mod.css"></link> </head> <body bgColor="#E3E3E3"> <span style="text-align: center">Coded by AnnualMelons</span><br> <span style="color: red; background-color: #2CE65A">Use this generator to generate the code required to create a JSON message.<br> Fill in the blanks to generate the code. The generator will guide you through it as you go along. Have fun!</span> <script> </script> </body> </html>
The “Coded by AnnualMelons” part is supposed to be in the center, but it’s not. At least for me this is not so.
I know that the other part of the file does not matter, but I thought I could show you that this could be an external problem.
I'm sure I'm just making a stupid mistake, because I haven't done this for a while, but it doesn't work ... so yes. I use Firefox as my web browser if that helps.
Thanks!
html text-align
KarteMushroomPandas
source share