X
Tocca qui per la versione per piattaforma mobile del sito.

Forum di supporto

Questa discussione è archiviata. Inserire una nuova richiesta se occorre aiuto.

Font-size of h1 is shown different (36px vs. 24px), when it is part of HTML-element "main" or "section"

Inserita

My HTML-file contains the following code: ... <main>

<h1>Headline</h1>
Some Text

... </main>

When I change "main" to "section", the font-size changes from 36px to 24px (this is reported by webdevelopper), but only for "Headline", for "Some Text" font-size remains unchanged. In CSS I have "body {font-size1: 1.1em;}", no other rules for font-size.

Can You explain this and/or give help? Thanks Andreas

My HTML-file contains the following code: ... &lt;main&gt; &lt;h1&gt;Headline&lt;/h1&gt; Some Text ... &lt;/main&gt; When I change "main" to "section", the font-size changes from 36px to 24px (this is reported by webdevelopper), but only for "Headline", for "Some Text" font-size remains unchanged. In CSS I have "body {font-size1: 1.1em;}", no other rules for font-size. Can You explain this and/or give help? Thanks Andreas

Modificato da cor-el il

cor-el
  • Top 10 Contributor
  • Moderator
17589 soluzioni 159130 risposte

I see some font-size rules in the default builtin html.css file.

  • view-source:resource://gre-resources/html.css
I see some font-size rules in the default builtin html.css file. *view-source:resource://gre-resources/html.css

Utente che ha posto la domanda

Thanks for prompt answer. The link is somewhat helpful. I don't understand the rules completely, but I suppose, there are modifications along with the new version 63.0.1, which cause what I see in my webpage. So, it is as it is.

Thanks for prompt answer. The link is somewhat helpful. I don't understand the rules completely, but I suppose, there are modifications along with the new version 63.0.1, which cause what I see in my webpage. So, it is as it is.
jscher2000
  • Top 10 Contributor
8800 soluzioni 71984 risposte

Can you provide a link to an example page demonstrating this problem?

Can you provide a link to an example page demonstrating this problem?