Getting Started with HTML

Core Concepts and Definitions of HTML

HTML, which is an acronym for Hypertext Markup Language, is the premier and most ubiquitous language utilized for the design and creation of web pages. The architectural essence of HTML lies in its two component concepts: hypertext and markup. Hypertext describes the methodology through which web pages or individual HTML documents are interconnected via links; the actual links present on a web page are themselves categorized as hypertext. As a markup language, HTML serves to describe the structural framework of web pages through the application of specific markup tags. These tags are applied to a standard text document to instruct a web browser on how the content should be organized and visually represented for the user.

The Historical Evolution of HTML and W3C Standards

The development of HTML was initiated in late 19911991 by Tim Berners-Lee, who is widely recognized as the Father of the World Wide Web (WWWWWW). As the digital landscape of the web expanded, the language used for communication underwent several significant revisions and standardizations. In 19951995, the HTML 2.02.0 specification was finalized and published. Interestingly, during that same year, an HTML 3.03.0 draft specification was proposed but ultimately expired without receiving an official recommendation. By 19971997, however, HTML 3.23.2 achieved the status of World Wide Web Consortium (W3CW3C) recommendation.

The progression continued in late 19971997 with the release of the public draft for HTML 4.04.0, which subsequently received official recommendation from the W3CW3C. In 19991999, HTML 4.014.01 was published and established as the standard. Following this version, there was a significant hiatus in the release of new versions for many years. It was not until 20142014 that HTML55 was published as a W3CW3C recommendation, followed by HTML5.15.1 in 20162016, and HTML5.25.2 in 20172017, which currently stands as the recommendation. These modern iterations introduced updated features while purging elements irrelevant to the contemporary web and addressing software bugs. A software bug, or simply a bug, is defined as an error, flaw, failure, or fault in a computer program or system that produces incorrect or unintended results and behaviors.

Selecting and Utilizing HTML Editors

Writing HTML documents requires the use of specialized software known as HTML editors. While default simple text editors—such as Notepad for Microsoft Windows or TextEdit for Mac—are suitable for foundational learning, more advanced tools offer greater functionality. For comprehensive web development, Notepad++ is recommended. Notepad++ is a free source code editor designed for Microsoft Windows that enhances productivity by supporting tab-based editing and allowing multiple files to remain open within a single window. The software, specifically version 8.1.78.1.7, can be obtained through the official project website: https://notepad-plus-plus.org/downloads/v8.1.7/.

The user interface of the Notepad++ environment consists of seven primary components. The Title bar displays the current filename, its type, and its stored location. The Tab bar facilitates quick access to all currently open documents. The Line number area explicitly identifies the position of every line of code, which is essential for debugging. The Text area serves as the primary workspace where code is entered. The Status bar provides real-time information regarding the cursor's location. The Menu bar houses the various commands required for program operation, while the Toolbar contains icons for the most frequently used editing functions.

Foundational HTML Tags for Document Structure

Every HTML document relies on a set of basic tags to define its contents. Heading tags, for instance, are used to denote the hierarchy and importance of titles. There are six levels of headings, defined from <h1> down to <h6>. The <h1> tag is reserved for the most significant heading, whereas <h6> is used for the least important. A notable characteristic of headings is that web browsers automatically insert a single empty line both before and after the heading element. The standard syntax is <h1>Heading Name</h1>.

The paragraph tag, denoted as <p>, is used to define blocks of text. Similar to headings, browsers automatically provide vertical spacing (one line before and one line after) for paragraphs. It is important to note that browsers are designed to collapse whitespace; adding extra spaces or lines within the HTML code will not change the visual output of the web page. For example, if a developer writes an

tag followed by text across several lines with various spaces, the browser will ignore the extra formatting and display it as a continuous string.


Line Breaks, Preformatted Text, and Section Dividers

When a developer needs to start a new line without initiating a new paragraph, the Line Break tag, <br />, is used. This is a unique element known as an empty element, meaning it does not require a closing tag because it contains no content between the markers. Developers must observe a specific syntax: there should be a space between the characters 'br' and the forward slash. This space is crucial because older web browsers may fail to render the line break correctly if it is omitted. Using the syntax Text line 1<br />Line 2 will force the second line of text directly below the first without the extra vertical spacing characteristic of paragraphs.

Alternative formatting is possible with the Preformatted tag, <pre>. This tag is used when the developer wants the browser to preserve all spaces and line breaks exactly as they appear in the source code. Content within a <pre> element is typically displayed using a fixed-width font, most commonly Courier. Another structural tool is the Horizontal Rule tag, <hr />. This tag is used to generate a horizontal line across the page, serving as a visual divider between different sections of web content.

Character Entities and Reserved Symbols

Because certain characters are reserved for code syntax, HTML requires the use of character entities to display specific symbols. A primary example is the non-breaking space, represented by the entity name &nbsp; or entity number &#160;. If a developer attempts to add five consecutive spaces in the code using the spacebar, the browser will remove four of them; thus, &nbsp; must be used repeatedly to achieve the desired spacing. Furthermore, symbols like the less-than sign (<<) and greater-than sign (>>) must be replaced with entities such as &lt; (<<) and &gt; (>>) to prevent the browser from misinterpreting them as the start or end of a tag.

There are numerous other useful character entities available for developers. These include the ampersand &amp; (&), double quotation marks &quot; (""), and the single quotation mark or apostrophe &apos; (′'). Currency symbols also have specific entities, such as the cent &cent; (¢¢), pound &pound; (££), yen &yen; (¥¥), and euro &euro; (€€). Legal symbols include the registered trademark symbol &reg; (®®) and the copyright symbol &copy; (©©). It is critical to remember that entity names are case-sensitive.

Documentation through the Comment Tag

The comment tag is a vital tool for developers to organize and troubleshoot their code. The syntax for a comment is <!-- Comments -->. Anything placed within these delimiters will be ignored by the web browser and will not appear on the rendered web page. Comments serve three primary functions: providing notes or reminders within the document, offering detailed descriptions to explain the logic of specific parts of the source code, and "commenting out" lines of code during the debugging process to help isolate and search for errors. Comments can span multiple lines, allowing for extensive documentation as needed.