Markup

Mark-up language is used to structure information on the web. The markup marks what is paragraph, heading, link, image, etc. Here we study the basics.

Suggested timeout: At least 20 hours.

This lecture is linked to Learning Objective 9.

This study module is individual and can be studied at any time.

Markup Language UP


Tim Berners-Lee (Credit to: codigoespagueti.com)

Scientific texts are filled with references to other scientific texts. By including "mark's" the these texts with start and stop markings Tim Berners-Lee got the result with hypertext he hoped for in his research project and was presented on March 12, 1989. With labels or tag's in electronic texts, links to other texts were created in different documents in an information system. This connected a of bundle documents from different computers.

The system of the hyperlinked documents should become known as the World Wide Web (www) and consisted of the three parts:

  • server software (web server)
  • client software (browser)
  • tagging language (HTML)

HTML markup language spread across the Internet in 1991 and since then, web servers, browsers and HTML developed several times, not least with security, accessibility and mobility in mind.

The purpose of HTML UP

The sooner you understand the following, the easier you get with understanding HTML.

The purpose of the markup language HTML is to mark parts of the information, such as the heading, paragraph, image and link, so it can be rendered (displayed) in web browsers.

This is important!

  • HTML structures the information, nothing more
  • HTML should never be used to decorate the information, ever
  • HTML describes what is in the information by structuring it. Here's the heading, here ends heading. Here's a link, here link stops etc.

HTML together with the Cascading Style Sheet (CSS) technology combines web design. More on that later.

Here you will learn HTML.

Open Standard UP

The w3.org Standardization Organization works with many open technical standards and welcomes all enhancement suggestions. The process of standardization is also open and standardized. W3C describes that one proposals undergo different degrees of maturity maturity levels and build on achieving maximum degree of consensus for all involved. Once a technical report has gained substance and development has begun, it can advance in levels...

  1. Working Draft (WD)
  2. Candidate Recommendation (CR)
  3. Proposed Recommendation (PR)
  4. W3C Recommendation (REC)

HTML5.2 is the recommended standard since December 14, 2017, version 5.3 is on its way. The previous versions get the status "Obsolete".

Labeling UP

The principle of markup is childish simple. Let us examine the following information "Warning do not drink from the bottle". Verbally expressed as a wiper or pronounced with a loud and clear voice. Expressed with HTML it becomes...

<h1>Warning</h1>
<p>
do <strong>not</strong> drink from the bottle</p>
Code 1. "Warning do not drink from the bottle"

The HTML-element consists of <h1> for header and <p> for paragraph (paragraph) and <strong> for (strong expression). HTML has a little more than 100 elements. You get a long way by learning about 15 pieces.

The above HTML code gives the following results ...

Warning

do not drink from the bottle

The result of code 1.

HTML Elements and Attributes UP

HTML elements have ocksp attributes listed to further describe HTML elements. Read it like one HTML elements may have additional properties. The item <img> (image) just defines & quot; image & quot; but its attribute src="..." talks about which image file it is. Following is a correct example that also includes the attribute alt="..." (alternative text).

<img src="images/king-of-sweden.jpg" alt="His Majesty King">
Code 2. Examples of HTML elements with attributes. The image path is the folder "images"

Let's look at the full Attribute List for the HTML element <img> described by w3.org:

Global attributes

alt - Replacement text for use when images are not available

src - Address of the resource

crossorigin - How the element handles crossorigin requests

usemap - Name of image map to use

ismap - Whether the image is a server-side image map

width - Horizontal dimension

height - Vertical dimension

Description of the HTML element IMG (HTML5) Extract from w3.org.

Each HTML element has its attributes and many attributes can be applied to several of the HTML elements. A img can have the height attribute and the same attribute can also be a tr (table row).

Get Started Practically UP



Install Visual Studio Code (19.04)
Introduction to HTML (17.03)
More on Emmet (14.13)
Collaborate in Visual Studio Code (7min 44sec)

Individual Tasks UP

  • If you are new to this with HTML, I recommend that you follow the movies and do the same as I show.
  • When you consider you understand the HTML as a tool for structuring given information, continue with Stylesheet