📖 Full detailed notes here: Open in Notion
File paths specify the location of files in a website's folder structure. They are used to link to other HTML pages, images, CSS files, and JavaScript files. Proper path specification is crucial for resources to load correctly.
There are two main types of file paths: absolute paths (complete URL including protocol and domain) and relative paths (path relative to the current document's location). Each has specific use cases in web development.
Relative paths specify the location of a file relative to the current document. They can point to files in the same folder (filename.ext), subfolders (folder/filename.ext), or parent folders (../filename.ext).
Absolute paths provide the complete URL to a resource, including the protocol (http/https) and domain name. They are used to link to external resources or when the exact location needs to be specified regardless of current file location.
Boilerplate code provides a standardized starting structure for HTML documents, ensuring proper document type declaration, meta tags, and basic structure. This saves time and ensures consistency across projects.
HTML boilerplate includes essential elements like <!DOCTYPE html>, <html>, <head> with meta tags, character encoding, viewport settings, and the <body> where visible content is placed.
UTF-8 (Unicode Transformation Format - 8-bit) is the standard character encoding for HTML documents that supports all characters and symbols from all writing systems worldwide. It's specified using <meta charset="UTF-8">.
ASCII (American Standard Code for Information Interchange) is a character encoding standard that represents text in computers. HTML entities can represent ASCII characters using codes like &#number; or &name;.
The <div> tag is a generic container element used to group content for styling purposes or to apply JavaScript functionality. It's a block-level element that doesn't inherently represent anything.
Class and ID attributes are used to identify elements for styling with CSS or manipulation with JavaScript. Classes can be applied to multiple elements, while IDs must be unique within a page.
The <header> element represents introductory content, typically containing navigational aids, logos, or heading elements. A document can have multiple header elements for different sections.
The <main> element represents the dominant content of the <body> of a document. It should be unique to the document and exclude content that is repeated across pages like navigation or footers.
The <footer> element represents a footer for its nearest sectioning content or root element. It typically contains information about the author, copyright data, or links to related documents.
💻 Sample Code and Practice Questions: View on GitHub
💻 Blog Article: View on GitHub