HTML5 introduced several new semantic elements that provide better structure and meaning to web pages. Here are some of the key semantic elements:
Section
This is a section
Sections are used to group related content together. They typically have a heading and can contain other elements like paragraphs, images, and lists.
Article - Usable many different times
This is a section inside an article
Articles are for self-contained content that could be distributed independently from the rest of the site. Examples include a forum post, a magazine or newspaper article, or a blog entry.
Main - Main content of the page
This is the main content area
The main element is used to encapsulate the dominant content of the
of a document. There should only be one element per document.
Forms, Lists, and Data
Unordered List Item 1
Unordered List Item 2
Nested Unordered List Item 1
Nested Unordered List Item 2
Unordered List Item 3
Ordered List Item 1
Ordered List Item 2
Nested Ordered List Item 1
Nested Ordered List Item 2
Ordered List Item 3
Sample Data Table
Name
Age
City
Alice
30
New York
Bob
25
Los Angeles
Charlie
35
Chicago
End of Table
WCAG - The Four Pillars of Accessibility
Perceivable - Information must be presentable in ways users can perceive
Operable - User interface components and navigation must be operable by all users
Understandable - Information and the operation of the user interface must be understandable
Robust - Content must be robust enough to be interpreted by a wide variety of user agents, including assistive technologies, This is the point of semantic HTML
This is an inline quotation.
This is a block quotation. It is used for longer quotes that are set apart from the main text.
CSS Basics and Visual Identity
Element selector - h1, p, ul, li, etc.
Class selector - .header, .button
ID Selector - #nav, #home, #about
Pseudo-Selector - :hover,
CSS: Cascading Style Sheets
an Inherent property of CSS, the rule that is further down on the CSS file will be applied last, and shown on the screen
Hierarchy
1) Inline stlying - Not good practice, CSS will only apply to what it is written
2) Internal CSS - In the head of the HTML document, applies to the whole document
3) External Stylesheet - link:css
ID is more specific than class, and class is more specific than element. Therefore, ID will override class, and class will override element. If two of the same type are applied, the one that is lower on the CSS file will be applied.
Box Model
Every HTML element can be considered as a box. The CSS box model describes the rectangular boxes that are generated for elements in the document tree and consists of: margins, borders, padding, and the actual content.
Web Safe Fonts vs Web fonts
Web Safe Fonts - A set of fonts that are widely available across different operating systems and devices. Examples include Arial, Times New Roman, and Courier New.
Web Fonts - Custom fonts that can be embedded into web pages using services like Google Fonts or Adobe Fonts. These fonts may not be installed on the user's device but are downloaded when the page loads.
font-family: Specifies the typeface for text in order left to right in the line.
Font sizes:
Select a base number - body text size
Select a ratio - determine spacing and relationship between elements