Skip to main content

HTML & CSS

 BASIC TERMINOLOGY OF HTML AND CSS

THE THREE LANGUAGES OF THE FRONT-END  

WHAT IS HTML?

HOT SALEπŸ‘©
 πŸ‘‰HyperText Markup Language.
 πŸ‘‰ HTML is a markup language that web developers use to structure and describe the content of a webpage (not a programming language).
 πŸ‘‰ HTML consists of elements that describe different types of content: paragraphs, links, headings, images, videos, etc.
 πŸ‘‰ Web browsers understand HTML and render HTML code as websites.

ANATOMY OF AN HTML ELEMENT

WHAT IS CSS?

πŸ‘‰Cascading Style Sheets 
πŸ‘‰ CSS describes the visual style and presentation of the content written in HTML 
πŸ‘‰CSS consists of countless properties that developers use to format the content: properties about font, text, spacing, layout, etc.

HOW WE SELECT AND STYLE ELEMENTS

A CSS RULE 

CSS THEORY #1: CONFLICTS BETWEEN SELECTORS 

CONFLICTING SELECTORS AND DECLARATIONS

RESOLVING CONFLICTING DECLARATIONS


CSS THEORY #2: INHERITANCE AND THE UNIVERSAL SELECTOR


CSS THEORY #3: THE CSS BOX MODEL

πŸ‘‰Content: Text, images, etc.
πŸ‘‰ Border: A line around the element, still inside of the element 
πŸ‘‰ Padding: Invisible space around the content, inside of the element
πŸ‘‰ Margin: Space outside of the element, between elements 
πŸ‘‰ Fill area: Area that gets filled with background color or background images

ANALOGY FOR THE CSS BOX MODEL

ELEMENT HEIGHT AND WIDTH CALCULATION

Final element width = left border + left padding + width + right padding + right border 
Final element height = top border + top padding + height + bottom padding + bottom border 
πŸ‘‰ We can specify all these values using CSS properties 
πŸ‘‰ This is the default behavior, but we can change it  


CSS THEORY #4: TYPES OF BOXES 

BLOCK-LEVEL ELEMENTS

πŸ‘‰ Elements are formatted visually as blocks
πŸ‘‰  Elements occupy 100% of the parent element’s width, no matter the content
πŸ‘‰ Elements are stacked vertically by default, one after another 
πŸ‘‰  The box model applies as shown earlier



INLINE ELEMENTS

πŸ‘‰ Occupies only the space necessary for its content 
πŸ‘‰ Causes no line-breaks after or before the element
πŸ‘‰ Box model applies differently: heights and widths do not apply 
πŸ‘‰Paddings and margins are applied only horizontally (left and right)



SUMMARY: INLINE, BLOCK-LEVEL, AND INLINE-BLOCK BOXES


CSS THEORY #5: ABSOLUTE POSITIONING 

NORMAL FLOW VS. ABSOLUTE POSITIONING

UNDERSTANDING ABSOLUTE POSITIONING


THE BOX MODEL WITH BOX-SIZING: BORDER-BOX






ladies jackets get this offer

Comments

Followers