Click here to Skip to main content
15,891,905 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Normal html
HTML
 <body>
<h1> This is heading First </h1>
</body>
</html>




After Section
HTML
<body>
<section>
<h1> This is heading First 
</h1></section>
</body>
</html>


Even if i use <article> </article> it also reduce the font size of h1.

Give me suggestions>>

What I have tried:

After using or without section tag font get changed
Posted
Updated 26-Mar-16 9:46am
v2

Se HTML section Tag[^], where you can test it. It seems that H1 inside a section creates a smaller font than outside.
 
Share this answer
 
You can easily fix it by using CSS:
CSS
h1 { color: red; font-size: 130%; }

In this case, the different in "h1" font size in "section" will be ignored. To make sized different, but your own, use
CSS
h1 { color: red; font-size: 120%; }
section h1 { color: red; font-size: 160%; }
/* and so on... */


Many use the following trick: to make all rendering very close with all different cases, with different browsers/platforms, do the following: create so called "reset CSS" and apply it to each and every HTML page, to bring rendering engines to some "common denominator". On top of it, specific CSS are developed. See, in particular, CSS Reset | 2015&#039;s most common CSS Resets to copy/paste, with documentation / tutorials[^].

—SA
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900