Module 1: HTML, Clients, and Servers

Introducing HTML

HTML (Hypertext Markup Language) is the foundation of the World Wide Web and a core technology in web development. It is a markup language used to structure and present content on the internet. HTML uses a set of predefined tags to define the structure and semantics of text-based documents, allowing browsers to interpret and display web content accurately.

Key Characteristics of HTML:

  1. Markup Language: HTML uses tags, enclosed in angle brackets (< >), to mark up elements within a document. Tags are used to define headings, paragraphs, links, images, and more.
  2. Hierarchical Structure: HTML documents follow a hierarchical structure, where elements are nested inside other elements. This nesting creates a logical flow of content.
  3. Text-based: HTML primarily deals with text content, allowing you to structure and organize text for presentation on web pages.

How HTML Differs from Other Languages:

HTML is distinct from other programming languages in several ways:

  • Declarative vs. Procedural: HTML is declarative, describing the structure and content of a webpage without specifying how it should be displayed. Procedural languages like JavaScript, on the other hand, instruct the browser on how to perform specific actions.
  • Focus on Presentation: While CSS handles the visual presentation of HTML elements, HTML itself focuses on structuring content. Unlike JavaScript, HTML does not offer logic or dynamic behavior.
  • Semantics and Accessibility: HTML is designed with semantic tags that convey meaning to both browsers and assistive technologies. This aids in accessibility and search engine optimization. Other languages might not have the same level of built-in semantics.

What HTML Can Be Used For:

  • Web Pages: HTML is the fundamental language for creating web pages. It defines the structure of the page, including headings, paragraphs, lists, images, links, and more.
  • Hypertext Links: HTML enables the creation of hyperlinks, allowing users to navigate between pages and resources on the internet.
  • Structuring Content: HTML helps organize content logically, making it easier for both humans and search engines to understand the hierarchy and relationships within a document.
  • Semantic Markup: HTML5 introduced semantic elements like <article>, <header>, <nav>, and <footer>. These tags give meaning to content, improving accessibility and search engine rankings.
  • Web Forms: HTML includes form elements such as <input>, <select>, and <textarea>, allowing users to input data, submit forms, and interact with web applications.
  • Media Integration: HTML supports the embedding of multimedia elements, such as images, audio, video, and interactive content, enhancing user engagement.
  • Responsive Design: HTML, along with CSS and JavaScript, is crucial for creating responsive web designs that adapt to different screen sizes and devices.
  • Web Accessibility: Proper use of HTML semantics and accessibility features ensures that websites are usable by individuals with disabilities.

In summary, HTML is the bedrock of web development, serving as the structure and foundation for creating web content. It defines the elements and their relationships within a web page, facilitating consistent and accessible presentation across various devices and browsers.



A History of HTML

Early Days of the Web and the Birth of HTML

The history of HTML (Hypertext Markup Language) is closely intertwined with the birth and growth of the World Wide Web. In the late 20th century, as computers and networking technologies advanced, the need for a system to share information and documents among researchers, scientists, and academics became apparent. The foundations of HTML were laid by Tim Berners-Lee, a British scientist, and computer programmer, while working at CERN (European Organization for Nuclear Research) in the late 1980s.

The Proposal for a Hypertext System

In 1989, Berners-Lee proposed a "distributed hypertext system" that would allow researchers to easily share and access information across computers. His initial proposal laid out the concepts of URLs (Uniform Resource Locators) for addressing documents, HTTP (Hypertext Transfer Protocol) for transferring documents, and HTML for formatting and linking documents. The idea was to create a system where information could be interconnected through hyperlinks, leading to a web of documents that users could navigate by clicking on links.

HTML: The First Markup Language

Berners-Lee and his colleague Robert Cailliau created the first version of HTML in 1990 as a markup language to structure and present documents on the web. The basic idea was to use tags to mark up different parts of a document, indicating how they should be displayed and how they related to each other. The first HTML document was published in 1991, establishing the foundations of web content creation.

HTML's Early Development

HTML went through several iterations and versions in its early days, with each version introducing new elements and features. The web started gaining traction beyond academia and research institutions, leading to a growing demand for improved capabilities. New tags were added to HTML to handle images, tables, forms, and other elements. However, these early versions of HTML lacked standardization, which made it challenging for different browsers to consistently render web content.

Standardization and the Birth of W3C

As the web continued to grow, the need for standardized HTML became increasingly clear. To address this, Berners-Lee founded the World Wide Web Consortium (W3C) in 1994, an international community that aimed to develop open web standards and ensure the interoperability of web technologies. The W3C's efforts led to the development of HTML 2.0, which was published as an official specification in 1995.

Evolution with HTML 3.2 and Beyond

HTML 3.2, released in 1997, introduced significant enhancements like tables, forms, and improved text formatting. However, the true turning point came with HTML 4.0 in 1997, which introduced cascading style sheets (CSS) for styling and layout control. This marked the beginning of separating content from presentation, allowing for more flexible and efficient web design.

The Rise of XHTML and HTML5

In the early 2000s, a new version called XHTML (eXtensible HyperText Markup Language) emerged. XHTML aimed to combine the flexibility of HTML with the strictness of XML, which brought improved compatibility and adherence to standards. However, XHTML adoption faced challenges due to its strict syntax requirements.

HTML5, the latest major version as of my last knowledge update in September 2021, marked a significant leap forward. It introduced new semantic elements, multimedia support (audio and video), canvas for graphics, local storage, and improved accessibility. The goal was to make web development more intuitive and capable of handling rich media and complex interactivity.

Conclusion: HTML's Ever-Evolving Journey

HTML's history is one of innovation, collaboration, and constant evolution. What started as a simple markup language for sharing research documents has grown into the backbone of the modern internet. From its humble beginnings to the complex web applications and multimedia-rich content of today, HTML has played a pivotal role in shaping the way we access and interact with information on the World Wide Web.



Big Ideas and Terms

Web Server:

A web server is like a powerful computer that stores and delivers web pages and other digital content to users over the internet. It's always on and connected, ready to respond to requests from users' devices. Think of it as a waiter in a restaurant, ready to bring you the menu and serve you the food you ordered.

Web Client:

A web client is the user's device, like a computer, smartphone, or tablet. It's what you use to access the internet and view web pages. Just like a restaurant customer who's hungry, a web client (your device) is eager to request and receive the web pages it wants.

Browser:

A browser is the software you use on your device to view websites. Examples include Google Chrome, Mozilla Firefox, and Microsoft Edge. Imagine the browser as the glasses you wear at the restaurant, helping you read and understand the menu (web pages) the server serves.

HTTP:

HTTP stands for HyperText Transfer Protocol. It's like the language the waiter (web server) and the customer (web client) use to communicate. When you want to order something (request a web page), your browser uses HTTP to ask the server for it. When the server has the page ready, it sends it back to you using HTTP.

HTML:

HTML stands for HyperText Markup Language. It's like the recipe for each dish (web page) in the restaurant. The server uses HTML to describe how a web page should be structured – where the headings, paragraphs, images, and links should go. Your browser reads this recipe and uses it to arrange and display the web page on your screen.

FTP:

FTP stands for File Transfer Protocol. It's like the system the restaurant uses to get its ingredients. Sometimes, web designers and developers need to upload files like HTML, images, and videos to the web server. They use FTP to transfer these files from their computers to the server, ensuring the server has everything it needs to create the dishes (web pages) properly.

Rendering an HTML Page:

When you enter a web address in your browser and hit Enter, your browser starts the process. It sends an HTTP request to the web server, asking for the web page. The server receives the request, finds the HTML recipe for the page, and starts cooking.

The server puts together the HTML, images, and other ingredients, creating a complete web page. It's like the kitchen staff preparing your dish. Once it's done, the server uses HTTP again to send this finished dish (the web page) back to your browser.

Your browser receives the web page's ingredients (HTML and other files), and just like following a recipe, it organizes everything. It places headings, paragraphs, images, and links exactly where the HTML recipe instructs. This process is called rendering.

Finally, your browser displays the fully assembled web page on your screen, and you can see and interact with the content – just like when your dish arrives at the table and you can start enjoying your meal.



How a Client and Server Work Together

The whole World Wide Web is based on a very simple principle, called the client-server model.  It involves a fairly basic interaction between your computer (the client) and another computer that is always on, always connected to the internet for the purpose of delivering webpages when asked.

 

On the left, we have an image that represents you and your computer.  On the right, the big black thing represents a web server.  What is a web server?  Actually, it's just another computer, sitting in a warehouse somewhere, always on and always connected to the internet.  The server runs special software that listens for and responds to a specific type of request, by sending a web page back to the computer that made the request.

For example, let's say you open up the Chrome web browser on your computer, and you type in the following web address:  www.bmoseley.com/php/tips.html

 

 



Creating, Uploading and Testing a Web Page

Let's walk through the steps a web designer would take to create an HTML file, upload it to a web server using FTP, and then test it by visiting a URL in their web browser. I'll break down each step in detail for your college-age students.

1. Creating an HTML File:

Step 1:

The web designer starts by planning the structure and content of the web page. They decide what headings, paragraphs, images, and links should be on the page.

Step 2: 

Using a text editor like Notepad (on Windows), TextEdit (on macOS), or a specialized code editor like Visual Studio Code, the web designer creates a new file. They give it a name like "index.html".

Step 3: 

Inside this HTML file, the designer writes the HTML code that defines the structure of the web page. They include tags like <html>, <head>, <title>, and <body> to organize the content.

Step 4: 

The designer adds content using tags like <h1>, <p>, <img>, and <a>. They use these tags to define headings, paragraphs, images, and links, respectively.

2. Uploading the HTML File Using FTP:

Step 5: 

The designer needs to upload the HTML file and any associated resources (images, CSS files, etc.) to a web server. They use FTP (File Transfer Protocol) for this.

Step 6: 

The designer opens an FTP client software like FileZilla. They enter the FTP server's address, username, and password. This is like driving to the restaurant and showing your reservation.

Step 7: 

In the FTP client, the designer navigates to the directory on their local computer where the HTML file is stored. They also navigate to the directory on the web server where they want to upload the file. This is like packing up your meal and bringing it to the restaurant.

Step 8: 

Using the FTP client, the designer selects the HTML file and any resources they want to upload. They click the "Upload" button, and the files are transferred from their computer to the web server. It's like the waiter taking your dish and placing it on the restaurant's table.

3. Testing the HTML File:

Step 9: 

After uploading, the designer wants to make sure the web page looks and works as intended. They do this by accessing the web page through a URL.

Step 10: 

They open their web browser and type in the URL where the web page was uploaded. This is similar to arriving at the restaurant and sitting down at your reserved table.

Step 11: 

The browser sends an HTTP request to the web server, asking for the web page. The server responds by sending the HTML file and any associated resources back to the browser.

Step 12: 

The browser reads the HTML file, processes the tags, and renders the web page on the screen. This is like your waiter bringing you the dish you ordered, beautifully presented.

Step 13: 

The designer examines the web page in the browser, making sure everything looks and works as intended. They click links, check images, and interact with forms if present. This is like tasting your meal, ensuring it's cooked to perfection.

Step 14: 

If there are any issues, the designer goes back to their HTML code, makes necessary edits, saves the changes, and repeats the FTP upload process to update the web page.

And that's how a web designer goes through the process of creating an HTML file, using FTP to upload it to a web server, and then testing it by visiting a URL in their web browser. Just like preparing a dish, bringing it to the restaurant, and enjoying the meal.



Why Web Standards Matter

What Are Standards?

Web standards refer to well-defined rules, guidelines, and specifications that dictate how technologies like HTML (Hypertext Markup Language) and CSS (Cascading Style Sheets) should be used to create web content. These standards ensure a consistent interpretation across various platforms and devices, facilitating interoperability and predictable behavior.

Examples of HTML and CSS Standards

HTML Standard: HTML5 is a prominent standard maintained by the World Wide Web Consortium (W3C) and WHATWG. It introduces new features and improvements while specifying how elements should be used. For instance, semantic elements like <header>, <nav>, and <article> help structure content meaningfully, aiding accessibility and search engine optimization.

CSS Standard: CSS3, another W3C standard, details how styles should be applied to HTML elements. For instance, CSS3 introduced the border-radius property, allowing developers to create rounded corners for elements. The @media rule facilitates responsive design by enabling different styles for different screen sizes.

Why Standards Are Important

Consistency: Standards ensure a uniform approach to development. For instance, adhering to HTML5's semantic elements allows developers to create consistent layouts and improves collaboration.

Interoperability: When following standards, websites are more likely to function correctly across diverse browsers. For example, using standardized CSS properties like color ensures the text color is consistent across platforms.

Accessibility: Standards promote accessibility. Employing proper HTML structures and CSS techniques can ensure screen readers accurately interpret content, benefiting users with disabilities.

Future-Proofing: Adhering to standards enhances a site's longevity. Sites built on well-structured HTML5 and CSS3 are more adaptable to future technologies.

Efficiency: Standards streamline development. For instance, CSS3's flexbox layout simplifies creating flexible and responsive page structures.

Why Browsers Implement Standards Differently

Interpretation of Standards: Browser vendors might interpret standards differently, resulting in slight variations in rendering. For example, the interpretation of certain CSS properties like line-height can lead to minor differences in text layout.

Legacy Support: Browsers maintain compatibility with older sites. Sometimes, older sites use non-standard practices, forcing browsers to handle them differently.

Innovation and Experimentation: Browsers may experiment with emerging technologies. For instance, browsers may offer varying degrees of support for new HTML5 features like the <canvas> element used for graphics rendering.

Market Share and Priorities: Browser vendors prioritize features based on user needs. Features important to one browser's user base might receive different treatment in another.

Development Timelines: Browsers release updates at different intervals. This leads to differences in how quickly new standards or features are supported.

Vendor-Specific Features: Proprietary features, like Microsoft's -ms prefixed properties, may lead to inconsistencies as they deviate from the standard.

HTML and CSS standards are the backbone of web development, fostering consistency, interoperability, and accessibility. By adhering to these standards, developers can create web content that functions seamlessly across browsers and devices. Even though browsers may implement standards differently, ongoing collaboration and continuous updates aim to minimize discrepancies, ensuring a stable and adaptable web ecosystem.

Dealing With Different Standards

As a web designer, dealing with differences in browser support for standards is a crucial aspect of ensuring consistent and reliable user experiences across various platforms. Here are several strategies you can employ to address these differences:

  1. Understand Browser Support: Familiarize yourself with the specific HTML and CSS features or properties that might have inconsistent support across different browsers. Websites like caniuse.com provide detailed compatibility tables for various web technologies.
  2. Use Feature Detection: Employ JavaScript-based feature detection libraries, like Modernizr, to check for support before applying certain styles or functionalities. This prevents unsupported features from causing unexpected behavior or layout issues.
  3. Progressive Enhancement: Start with a core functionality or layout that works across all browsers and devices, and then enhance the experience for browsers that support additional features. This ensures that your site's basic functionality is accessible to all users.
  4. Graceful Degradation: Develop your site with modern standards and features, and then apply fallbacks or simpler designs for browsers that don't support those features. This approach allows you to provide a complete experience for all users while taking advantage of modern capabilities when available.
  5. Vendor Prefixes: Use vendor prefixes (e.g., -webkit-, -moz-, -ms-, -o-) to apply experimental or non-standard CSS properties. This can help ensure that browsers that require prefixes display certain styles correctly.
  6. Polyfills: Utilize polyfills, which are JavaScript libraries that provide modern functionality to older browsers lacking support. Polyfills can help you replicate the behavior of new features in browsers that don't inherently support them.
  7. Regular Testing: Regularly test your website in different browsers and devices to identify any compatibility issues early in the development process. This allows you to make necessary adjustments before the site goes live.
  8. Browser-Specific CSS: In some cases, creating separate CSS rules specifically for certain browsers might be necessary. However, use this approach as a last resort, as it can complicate maintenance.
  9. Community Resources: Engage with web development communities and forums to learn about common workarounds and solutions for browser compatibility issues. Sharing experiences and learning from others can be invaluable.
  10. Feedback and Reporting: If you encounter significant issues with browser support, consider reporting bugs to browser vendors. Your feedback can contribute to improving browser compatibility.
  11. Regular Updates: Stay informed about updates to browser versions and standards. Browsers often update to improve support for standards and fix compatibility issues.
  12. Flexible Layouts: Design flexible layouts that can adapt to different screen sizes and orientations. CSS techniques like media queries and flexible grids can help achieve responsive designs. This one should be a top priority.

Remember that achieving perfect consistency across all browsers might not always be possible due to varying levels of support and implementation. However, by following best practices, employing strategies like feature detection and progressive enhancement, and staying updated with the latest developments, you can create websites that offer a robust experience for users regardless of their chosen browser.

Videos for Module 1: HTML, Clients, and Servers

Key Terms for Module 1: HTML, Clients, and Servers

No terms have been published for this module.

Quiz Yourself - Module 1: HTML, Clients, and Servers

Test your knowledge of this module by choosing options below. You can keep trying until you get the right answer.

Skip to the Next Question