Book contents
- Frontmatter
- Dedication
- Contents
- List of Case Studies, Figures and Tables
- List of Abbreviations
- Acknowledgements
- Preface
- Introduction
- 1 Openness in Heritage
- 2 Sharing Legally
- 3 Publishing Open Data
- 4 Using and Reusing Open Data
- 5 Visualising Open Data
- 6 Combining Open Data
- 7 Open Data for Research
- Appendix A Examples Used in the Book
- Appendix B Introduction to Coding
- References
- Index
Appendix B - Introduction to Coding
Published online by Cambridge University Press: 23 July 2020
- Frontmatter
- Dedication
- Contents
- List of Case Studies, Figures and Tables
- List of Abbreviations
- Acknowledgements
- Preface
- Introduction
- 1 Openness in Heritage
- 2 Sharing Legally
- 3 Publishing Open Data
- 4 Using and Reusing Open Data
- 5 Visualising Open Data
- 6 Combining Open Data
- 7 Open Data for Research
- Appendix A Examples Used in the Book
- Appendix B Introduction to Coding
- References
- Index
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 DataAn Introduction to Research, Publishing and Programming with Open Data in the Heritage Sector, pp. 129 - 134Publisher: FacetPrint publication year: 2019