HTML & CSS
382 subscribers
728 photos
1 video
4 files
54 links
πŸ‘Œ HTML & CSS
@html_css_tut

πŸ‘ŒJavaScript
@javascript_tut

πŸ‘Œ PHP
@php_tut


πŸ‘ŒAll About Coding
@codingWithElias
Download Telegram
Online Book Store - PHP & MYSQL Project

https://youtu.be/IMCHi-5Ig40
Online Book Store - Full PHP & MYSQL Project
HTML + Bootstrap 5

https://youtu.be/-qMnJJ_cUng
πŸ’ŽSet Font Size With Pixels

Setting the text size with pixels gives you full control over the text size:

πŸ“ŽExample:
-----------------------------
h1 {
  font-size: 60px;
}
-----------------------------

πŸ’ŽSet Font Size With Em

To allow users to resize the text (in the browser menu), many developers use em instead of pixels.

1em is equal to the current font size. The default text size in browsers is 16px. So, the default size of 1em is 16px.

The size can be calculated from pixels to em using this formula: pixels/16=em


πŸ“ŽExample:
-----------------------------
h1 {
  font-size: 3.5em;
}
-----------------------------

πŸ’ŽSet Font Size With REM

rem values are relative to the root html element, not to the parent element. That is, If font-size of the root element is 16px then 1 rem = 16px for all elements. If font-size is not explicitly defined in root element then 1rem will be equal to the default font-size provided by the browser (usually 16px).

When it comes to spacing and font-sizing, I prefer to use rem. Since rem uses root element’s font-size instead of its parent’s font-size.

πŸ“ŽExample:
-----------------------------
h1 {
  font-size: 2.5rem;
}
-----------------------------

@html_css_tut
"w3schools .com,
medium. com "
CSS Opacity

πŸ’ŽThe opacity property specifies the opacity/transparency of an element.

πŸ’ŽThe opacity property can take a value from 0.0 - 1.0. The lower value, the more transparent.

πŸ“ŽExample:
-------------------------------
img {
  opacity: 0.5;
}
--------------------------------

@html_css_tut
"w3schools .com"