Skip to main content Accessibility help
×
Hostname: page-component-7479d7b7d-8zxtt Total loading time: 0 Render date: 2024-07-11T13:16:22.315Z Has data issue: false hasContentIssue false

Appendix B - Introduction to Coding

Published online by Cambridge University Press:  23 July 2020

Henriette Roued-Cunliffe
Affiliation:
University of Copenhagen, Denmark
Get access

Summary

One of the first lessons in learning to code is learning to search the web for examples of code or tutorials matching your needs. In the following I will present the very basics of HTML, CSS, JavaScript, PHP and Python. Where you go from here is up to you. However, I would suggest working through the material provided by the various educational websites for learning web development.

HTML

When I introduce students to web development I always begin with HTML (see more on www.w3.org/html). This is because HTML is the main building block of the web. Even though we now rarely build websites from scratch in HTML, it is still used in conjunction with other web development languages as you will see in the examples of Chapters 5 and 6.

The acronym stands for Hyper Text Markup Language, describing a markup language for web documents. HTML was developed in the late 1980s and early 1990s by Tim Berners-Lee. It is based on the Standard Generalised Markup Language (SGML), from which the concept of tag pairs comes. Both are used to mark up structural units (e.g. paragraphs, headings, list items, etc.). In this way the documents that are marked up can be displayed on any machine (Raggett, 1998). HTML consists of pre-defined elements (tag pairs or single tags) which determine how the content between the tags is presented in any browser. For example, the header tags ‘<h1> … </h1>’ always represent the topmost header, and is by default always styled as the largest of the headers on a webpage; while the single tag ‘<br/>’, by default renders a line break.

In HTML, comments begin with <!— and finish with —>.

The basic example below illustrates the following HTML code:

  • a declaration that the document is HTML;

  • the <html> root tags enveloping the page;

  • the <head> tags enveloping the metadata about the document;

  • the <title> tags specifying the title of the page – displayed in the browser window;

  • the <body> tags enveloping the visible page content;

  • the <h1> tags defining the top heading;

  • the <p> tags defining a paragraph.

Type
Chapter
Information
Open Heritage Data
An Introduction to Research, Publishing and Programming with Open Data in the Heritage Sector
, pp. 129 - 134
Publisher: Facet
Print publication year: 2019

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Available formats
×