+ 6
How do you style the marquee and hr in HTML5? Can you make a short hr or it always appears the same way it does?
I think it should be the same styling as in <marquee style="font-weight: bold;"></marquee> etc.. But then this same styling has only been used to reduce or increase the size, style color of marquee. Kindly tell us how to style it better. Thanks.
1 Resposta
+ 1
The <marquee> tag isn't used anymore. See:
https://www.w3docs.com/learn-html/html-marquee-tag.html
Yes, the <hr> element can be shortened. You will want to override the default style ("display: block;") with something that doesn't take up 100% width (for example, "display: inline-block;"). However, I find that in many cases, having the element take up 100% width is a good thing, so you can shorten the appearance of the border with margin or padding while maintaining the 100% width. Note that different browsers have different defaults for the <hr> element (as in sometimes no line/border is displayed, so it functions like a <br> element) so if you care about consistency across browsers, you may want to be explicit about the border style.
If you have further questions, please don't hesitate to reach out! :)