Skip to main content
Main Content

SOLVED, thank you!

SOLVED, thank you!
Posted 2022-05-04 10:28:29 (edited)
Hi! I've been trying to bolden and header-ize code on my den page at the same time and for the life of me I can't figure out how to get them to all work together! I put the text, the center it with the button, then try to put it in bold, then make it a header. I've switched the last 3 steps around in order on the code as many times as I can but unfortunately I seem to be stoopid /lh

Thank you in advance! I'm sorry for clogging the forums haha

AngelBirdo
#65077

Posted 2022-05-04 13:47:49
I'm not sure what your code looks like, but you might not be opening and closing your tags in proper order? For example:

<center><b><h2>My Header</h2></b></center> will work.

My Header

<center><b><h2>My Header</b></h2></center> will not work.

Notice the in the second instance, you open a bold tag, start a header tag, but then the bold tag closes -- the code gets confused since the header closing tag got "cut off." The bold tag should encompass the header tag since it was opened first. It may help to think of it like simple sentences. Your first sentence is "My dog is big." and your second sentence is "He is red." It makes sense to say "My dog is big. He is red." but it doesn't make sense to say "My dog He is red is big." You're interrupting one thing that hasn't been completed with another thing.

Optionally, and this is my preference, you can use a span, p, or div style tag and combine them all into one. It's cleaner and there's less worry about opening/closing tag order since you only have your div tag (although, it's not really proper use to increase font size to mimic a header, in this case since it's just for fun on a virtual site, it doesn't really matter). For example, this is what the div code would look like if you were to use the same properties as above.

<div style="font-weight: bold; font-size: 2em;">My Header</div>

My Header

fireflii
#757

Posted 2022-05-04 14:21:50
Ooh, okay, thank you so much! I saw
s on the HTML help thread but nobody really,,, explained this haha

AngelBirdo
#65077

Search Topic