2026-08-12 12:46

Status:


IBM - IHCJ - Module 1 - HTML Overview

==HTML Overview

  • Introduction to HTML
    • HTML (Hypertext Markup Language (HTML) - which is basically the language of the internet. It was originally designed for sharing scientific documents, however in it’s history, it has been adapted to suit the requirement for displaying various types of documents such as web pages

    • HTML Elements are the building blocks of an HTML page

    • They are the pieces of content on said page, and are assigned labels just as paragraphs, lists, tables, a div, things like that

    • These are represented by tags, which are used by the browser to understand what to display and how to render the content

    • Pasted image 20260812185820.png

    • It was introduced to the internet in the early 1990 s by CERN and IETF,

    • In 1995, HTML 3.0 came out and had various recommendations added by the W 3 C for standardization

    • Above hand is a timeline depicting the method of HTML development and the several organizations that had worked on it

    • Objectives of HTML 5 as specified:

      • Defines a single language which can be written in HTML or XML syntax
      • Interoperability with earlier HTML implementations
      • An improvement for markup documents
      • Includes markup for APIs for idioms, such as web applications
    • Generally, the terms HTML and HTML 5 are used interchangeably, it implies HTML 5 and you only really say the five part if you are talking specifically about the different versions of HTML

  • HTML Features
    • HTML 5 Features-

      • Categories the web pages into different sections
      • It includes tools for data management, drawing, video, and audio
      • It also facilitates the development of cross-browser applications for the web and portable devices
      • It gives a more flexible way of web development, and allows for a dev to create an experience that is engaging to users, by making things similar to desktop apps
      • Allows for you to use API’s in order to make multi-platform applications
    • The <!DOCTYPE HTML> is basically a lag signaling the interpreter or I guess the web browser that the following document is that of HTML code, which means that it has to look for things like tags as mentioned above so it knows what to render and where

    • This means that the document gets parsed using HTML rules

    • A document transmitted with an HTML content type is processed as an HTML document by the web browser

    • Pasted image 20260812191022.png

    • The <html> tag is the root element of the tree, contains ALL of the other elements except for the doc-type tag, this means all other elements are nested inside of it

    • The <head> tag is generally the tab or whatever the tab looks like for the web browser, so the icon of your tab as well as it’s title would go there

    • The <body> tag is then basically where all of the real content of your HTML code would go, and holds things like the different elements, the different pieces of text, and all such other things

    • Pasted image 20260812191217.png

    • HTML User Agents (Also known as Browsers)- parse the mark up, and turn it into a DOM (Document Object Model) tree

    • Which is basically an in memory representation of a document, which contain a bunch of different knows that would generally be consistent with that of the tree structure of the html document

    • XML Syntax Example

    • Pasted image 20260812191322.png

    • Extensible Markup language (XML)- looks similar to HTML documents, except that xml tag on the first line instead of the doc-type like there was with HTML

    • In addition, the content type must be specified as XML media type, like application, xml, or xhtml

    • When a document is transmitted with the XML content type, is treated by the browser as an XML doc, and is parser differently

    • How do you decide which one to use?

    • The choice between XML and HTML is based on how you intend to use the application, if you are using XSST (instead of CSS), well then you would want to use XML instead of HTML

    • Generally, there is a divide on people between the two due to mostly things like semantics

    • The only real differences are that XHTML tags all need to be lowercase, while this does not matter in HTML, code formatting is different as well, where everything needs to have an end tag, filled content, and the works in XML

    • If an XML parser encounters a bad syntax situation, it will stop

    • This is generally not true for HTML, where the code syntax is a lot looser, and you can have things like uncontained elements and unmatched quotation marks

  • HTML Management and Support
    • Key Themes of HTML5
      • Syntax is compatible with HTML 4 and XHTML 1 documents
      • HTML is defined in a way where it is compatible with earlier versions of how browsers handle HTML content
      • Separates conformance requirements for user agents and authors
    • For agents, the elements of attributes of earlier specifications
    • For authors, it removes a lot of elements and attributes to simplify writing and reading the language
    • HTML also includes elements and APIs that help in creating web applications, which includes video and audio elements & an API for drag and drop elements
    • HTML is suitable for creating web applications because basically all browsers support it and it’s full range of features
    • There is also a TON of different APIs that can be used to enhance user experiences, like animation, drawing, audio, and video
    • You can also use HTML and CSS in order to improve page load time
    • Search engines can take keywords provided by meta tags for google and other engines such as <meta name="keywords" contents="coding, html production, css">
    • The below-hand is a range of HTML 5 elements
    • Pasted image 20260812201418.png
  • HTML Scripting
    • Scripting- the use of the <script> tag in the HTML doc or within a separate file, which is called inside of the HTML Code, this is basically how you attach something like javascript or other forms of functionality inside of the HTML document

    • It lets you provide a more interactive form of experience for your user, such as form validation, dynamic content manipulation, and image manipulation

    • Pasted image 20260812204711.png

    • Do let it be known that people can turn off JS in their browsers, so do not rely on it fully for your web application

    • Scripting - iframe running an website that contains and embedded object without the sandbox attribute grants the embedded object the same perms as the rest of your page, which can be useful if you would like for advertisements to be run inside of your page

    • Therefore, use the sandbox attribute on any tag that contains an embedded object

    • Pasted image 20260812205033.png

    • Every Single HTML and XML document loaded into a browser becomes a document object

    • This document object provides access to all HTML objects on a page, and can be accessed from within a script.

    • DOM tree accessors are HTML document APIs that provide access to all the HTML elements on a page

    • The property to access the HTML elements is prefixed by the word document

    • Pasted image 20260812205152.png

    • Pasted image 20260812205255.png

    • The above image shows some common DOM tree methods, which allow you to get given html elements inside of something like your script and modify them, allowing for dynamic changes of content

    • Included is an image of a javascript code that would use some of these DOM tree methods

  • HTML 5 Browser support
    • Not all browsers fully support all of the HTML 5 and CSS 3 features and capabilities, such as older versions of existing browsers if you are using them
    • New browser versions are continually added with support for HTML 5 features, with google chrome generally being known as the head honcho for their support
    • There are also support tables that show features supported by different browsers like Can I Use dot com
    • Below is an image representing how different browsers might display different kinds of HTML 5 elements
    • Pasted image 20260812205853.png
    • Pasted image 20260812205939.png
    • This is an example of a support table for date and input times from the above mentioned site. The numbers represent the browser version, and the color determines the level of support for HTML 5 features, with green being full support, yellow being partial, and red being little to no support for that given feature

    -Pasted image 20260812210228.png
    You can also verify that an HTML 5 element is supported in a browser using JavaScript, you can type in document.createElement() and include the parameter of the element you wish to create

    • This way, the object gets created no matter what, and if it is not supported by the browser, you can test the DOM object for known properties or methods to see if it is correct
  • Common HTML Elements

==Glossary

TermDefinition
DOM Tree”Document Object Model” is the data representation of the objects that comprise the structure and content of a document on the web.
XMLAn “eXtensible Markup Language” Designed to store and transport data allowing users to define their own markup languages, primarily to display documents on the web.
XHTMLAn “eXtensible Hypertext Markup Language” similar to HTML but with stricter formatting rules.
Web Storage APIsAPIs that allow data storage in a browser.

==Cheat-sheet


References

<!DOCTYPE HTML>
	<html>
		<head>
			<meta charset="utf-8">
			<title>Same Page</title?
		</head>
		<body>
			<p>Example Paragraph</p>
			<!--This is a comment-->
		</body>
  </html>