html - Space Between Heading and Canvas -


i wrote following code

.bluecolor{background-color : skyblue;}  canvas{width: 100pt;margin:0px;border: 5px solid;}  h1{margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;}
   <html>  <head>  <title>hello world</title>    </head>  <body>  <h1>hello</h1>  <canvas id = "canvas1" class = "bluecolor"></canvas>       </body>      </html>    

why there still space between hello , canvas , when have made every padding , margin 0 each element?i confused thing.

and have came know inline , block elements , used them no avail , deleted space between 2 canvas element when made them block , had not clue how working ?

if see wrong in question please comment , , correct it, still learning ways of site.

update people pointing line height , can include example in answer , explain mean?

there isn't space between hello , canvas. it's line-height of font.

https://css-tricks.com/almanac/properties/l/line-height/

line-height: 50%;

or can font. (with uppercase)

font explained: http://www.noupe.com/essentials/icons-fonts/a-crash-course-in-typography-the-basics-of-type.html


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -