DEV Community

Calin Baenen
Calin Baenen

Posted on

In Swedish, are HTML elements "i" or "på" eachother?

Original post on r/Svenska.

Ok, probably not many people here will know Swedish, but...
Are HTML elements "i" or "på" eachother?

The reason I ask is because I could argue a case for either.

<html lang="se-SV"">
  <head>
    <!-- ... -->
  </head>
  <body>
    <p>
      Jag är en HTML-paragraph-tag, och jag är i
      <!-- However you'd say "the body tag". -->
    </p>
  </body>
</html>
Enter fullscreen mode Exit fullscreen mode

The written form of HTML supports using "i" for describing element relationships.
BUT.
From a non-technical standpoint, you'd find that the browser renders the elements from the outer-most layer to the inner-most.
So we get (kind of) the reverse of the last argument.

Maybe you could use either depending on if you're talking about its technical sense or not, but I don't know which I should use.
Some input, even if it's an opinion, would help.

Thanks in advance!
Cheers!

Top comments (7)

Collapse
 
jonaspetri profile image
Jonas Petri •

I’d say it’s both. In how HTML is written, it is with no doubt “i”. But in how it is displayed, I’d argue it is also both. If you have a small green box, and inside the element you put a big red box, it will be “på”. But if you add the overflow: hidden; CSS rule for the green box, the red box will be “i”.

Collapse
 
calinbaenen profile image
Calin Baenen •

And it's "på" the green box, even if it's still technically "i" the green box?
(Because assuming there's no other styling except for the overflow:hidden; case, the green box would expand to fit the red one, if I remember right.)

Collapse
 
jonaspetri profile image
Jonas Petri •

To be clear, I meant something like this:

<div height=“50” width=“50”>
  <div height=“50” width=“50” style=“padding:25px”></div>
</div>
Enter fullscreen mode Exit fullscreen mode

In this case the inner div will arguably be “på” the outer div as long as you don’t add the overflow: hidden; css rule.

Thread Thread
 
calinbaenen profile image
Calin Baenen •

Thanks.
This is very useful!

Collapse
 
oskarcodes profile image
Oskar Codes •

Im Norwegian but still understand what you mean. The question is wether elements are stacked on top of each other (på), or are lying in each other (in). I think you should use “in”, because it’s the correct one from a technical point of view, but also kinda correct from a non-programmer point of view, as you have boxes ‘inside’ other boxes. So I’d go for “in”.

Collapse
 
calinbaenen profile image
Calin Baenen •

Thank you for your input! :)

This has shown to be the consensus thus far

Collapse
 
lionelrowe profile image
lionel-rowe •

New HTML element <på></på> just dropped 😏