**1. What is Web Frontend Technology?**Web frontend technology encompasses a suite of client-side technologies that run in the browser, including HTML, CSS, and JavaScript. In contrast, UI client technology relies on UI modules to build desktop applications, utilizing frameworks like Pygame, PyQt5, Tkinter, wxPython, and PyGUI combined with packaging tools such as PyInstaller.
2. Historical DevelopmentThe journey from Linux to the modern internet began in 1990 with GNU Linux. During the Cold War era, the United States developed ARPANET, which eventually led to Tim Berners-Lee designing the World Wide Web and making network technology accessible to the general public. His work involved creating SGML (which supported only text, lacking support for images, video, or audio) and subsequently HTML (which added support for multimedia). The challenge arose: how would ordinary users understand HTML code? This prompted the creation of the world's first open-source browser and rendering engine. Netscape Navigator emerged as the dominant commercial browser, capturing approximately 95% of the market share. Microsoft responded by developing Internet Explorer, sparking the First Browser War betweeen Microsoft (IE) and Netscape (Navigator). Initially, competition centered on plugin availability.
Brendan Eich developed LiveScript (later renamed JavaScript, despite having no relation to Java) using syntax borrowed from Java. This move helped Navigator defeat Internet Explorer. However, Microsoft refused to concede. They implemented JScript as a competitor but struggled to surpass the original. Microsoft then bundled Internet Explorer (including the famous IE 6.0) for free with Windows and pre-uninstalled it, effectively removing Navigator from user systems. Netscape filed an antitrust lawsuit against Microsoft, resulting in the world's first major antitrust case in the software industry. After years of litigation, Netscape ultimately collapsed, while Microsoft dominated the browser market with IE 6.0, winning the first browser war but losing the lawsuit and paying $10 billion in damages.
Former Netscape executives later created Mozilla, developing Firefox based on Navigator's code. This marked the beginning of the Second Browser War, pitting IE against modern browsers (Chrome, Firefox, Opera, Safari). Eventually, IE reached its end of life, and Microsoft abandoned it, releasing Edge (based on the Spartan browser) with Windows 10. The modern browser coalition emerged victorious in this conflict.
Consequently, Google Chrome became the world's most popular browser, commanding approximately two-thirds of the market. Today, while hundreds of browser variants exist, only three rendering engines remain: Trident (IE), Gecko (Firefox), and WebKit/Blink (Chrome). Browsers such as Safari, Opera, Maxthon, UC Browser, 360 Speed Browser, QQ Browser, and Sogou Browser are all based on the Blink engine.
3. W3C StandardsThe W3C (World Wide Web Consortium) establishes technical specifications that define web technologies. These standards cover HTML, CSS, JavaScript, XML, networking protocols, security, accessibility, and multimedia. The W3C's mission ensures interoperability, security, and sustainability across web technologies. These specifications provide developers, designers, and users with a common framework for creating consistent experiences across different devices and browsers.
W3C standards continuously evolve to address changing technology requirements. They offer coding guidelines that enable developers to build reliable, stable, and cross-platform compatible websites and applications.
Adhering to W3C standards involves understanding the specifications and best practices for HTML, CSS, and JavaScript. Using compliant tools and frameworks, implementing responsive design, and supporting accessibility features also contribute to standards compliance.
The Three Core W3C Standards:
The web development stack comprises three primary languages:
- HTMLHyper Text Markup Language serves as the structural foundation, using tags to define webpage content and layout. HTML enables developers to create the content and structure of web pages according to the structural standard.
- CSSCascading Style Sheets controls the visual presentation of web elements. CSS allows developers to style and modify the appearance of web pages according to the presentation standard.
- JavaScriptCommonly abbreviated as JS, this language handles interactive behaviors and dynamic functionality. JavaScript enables developers to create dynamic effects and data interactions, governed by the ECMA specification.
4. HTMLHyper Text Markup Language is a markup language, not a programming language. Consequently, it contains no variables or control structures.
The term "hypertext" refers to document formats that extend beyond plain text. While regular text displays only characters, hypertext can render various media types including HTML pages, documents, spreadsheets, and more.
HTML code must reside in files with the .html or .htm extension. Since HTML executes in the browser rather than the operating system, it operates independently of platform constraints, allowing a single HTML file to function correctly across any operating system with a browser installed.
HTML Document Structure
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Page Title</title>
<link rel="stylesheet" href="./styles.css">
</head>
<body>
<!-- HTML comments -->
<!-- Visible content appears between body tags -->
<!-- h1 represents the main heading,
typically used once per page for site title or logo -->
<h1 align="center">Welcome Page</h1>
<hr>
<div align="center">
Username: <input type="text"> Password:
<input type="password"> Date:
<input type="datetime-local" name="" id="">
</div>
<hr>
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit.<br>
<br> Error facere maxime deleniti laboriosam eius omnis voluptatum?<br><br>Distinctio corporis nisi officia mollitia at, sint alias quo odio aliquid quos vero reprehenderit!</p>
<hr>
<div></div>
</body>
</html>
| Tag | Type | Description |
|---|---|---|
| `` | Declaration | Indicates to the browser that the following code is HTML, requiring the HTML parser for interpretation. |
| `` | Paired | Wraps the entire webpage content. |
| `` | Paired | Contains metadata such as page title, character encoding, and keywords. |
| `` | Paired | Encloses the visible content of the webpage. |
<title></title> |
Paired | Child element of head, defines the browser tab title. |
<meta charset="UTF-8"></meta> |
Self-closing | Specifies the character encoding for the document. |
5. SyntaxHTML syntax comprises two elements: tags and comments. Comments remain invisible to end users but can be viewed by developers through right-clicking and selecting "View Page Source."
6. TagsTags represent the fundamental building blocks of HTML content, analogous to punctuation in natural language. Tags instruct the browser on how to display and interpret the enclosed content.
Tags are categorized by structure into two types:
- Self-closing tags: Format:
<tagname>or<tagname /> - Paired tags: Format:
<tagname>content</tagname>
Tags are also categorized by function into:
- Content tags: Primarily contain and display content; some content tags can nest other content tags.
- Structural tags: Mainly serve as containers for other tags; structural tags generally do not directly contain media content such as text, images, video, or audio.
7. Self-Closing TagsSelf-closing tags consist of a single tag name and require no closing tag. Syntax:
<tagname>
<tagname />
<tagname attribute="value"/>
Common Self-Closing Tags
| Tag | Description |
|---|---|
<meta></meta> |
Metadata tag for defining document-level information |
![]() |
Image embedding tag |
<link></link> |
External stylesheet link, similar to import statements, references CSS files |
|
Line break tag; browsers ignore whitespace in source files, so this tag forces a line break |
<input></input> |
Form input field tag |
--- |
Horizontal rule separator, denotes content transition |
8. Paired TagsPaired tags appear in opening and closing pairs. Syntax:
<tagname></tagname>
<tagname attribute="value" attribute></tagname>
Common Paired Tags
| Tag | Description |
|---|---|
|
Primary heading |
|
Secondary heading |
| ... | |
|
Sixth-level heading |
| `` | Paragraph block |
<a></a> |
Hyperlink anchor |
<div></div> |
Block-level container |
<span></span> |
Inline-level container |
<form></form> |
Interactive form container for user input |
|
Unordered list container |
2. |
List item element |
| ` | |
| --- | `Tabular data container |
Common Tag Usage Examples****Headings and Paragraphs
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document Title</title>
</head>
<body>
<!-- HTML provides predefined tags with specific semantic meanings -->
<h1>H1 Heading: Typically used for site logo or main title</h1>
<h2>H2 Heading: Typically used for section or category headers</h2>
<h3>H3 Heading: Typically used for section or category headers</h3>
<h4>H4 Heading: Used for subsections or article titles</h4>
<h5>H5 Heading: Smaller heading, rarely utilized</h5>
<h6>H6 Heading: Smaller heading, rarely utilized</h6>
<p>p -> Paragraph: Contains flowing text content</p>
</body>
</html>
Tag AttributesWhile tags primarily exist to display content, content sometimes requires additional visual treatment beyond simple text. Attributes provide a mechanism to specify how content should appear or behave.
HTML attributes come in two varieties:
- **Regular attributes:**Property and value are connected via an equals sign, with values enclosed in either single or double quotes. Double quotes are recommended.
- **Boolean attributes:**Contain only the attribute name with no value. When present, the attribute evaluates to true; its absence means false.