I have a webpage that displays the name of the "product", and the edit / delete links next to it are on the same line. Example:
Product 1 (Change | Delete)
I want the product name to have a large font size, and the edit / delete buttons to have the usual font size (the same as paragraphs and much more). And I want them to appear inline, as an example above. I'm just wondering which HTML / CSS should I use to achieve this.
If I use the h1 element for the product name, it pushes the edit / delete links to the next line, since h1 is a block element. So I could override h1 in my CSS and do it display: inline, but messing around with the natural look of h1 seems like something that would be against best practices (?).
Another option is to simply not use the h1 element at all and use a pair of inline divs or spacing. But not using the h1 element for the top-level heading of the webpage, it seems like something that is also contrary to best practices ... I would also need to explicitly specify the font sizes, that is, I cannot use the default font size of the h1 and p elements which I use throughout the site.
What is the best approach in this situation? I know this is a simple / trivial question, but it would be nice to know one way or another.
source
share