I just had to take the hypertext idea and connect it to the TCP and DNS ideas and
— ta-da!— the World Wide Web Tim Berbers-Lee, Inventor World Wide Web, 2008
Hyper Text Markup Language (HTML) is the main language used on the web to display information. The language forms the basis for all web pages. This language is not a full programming language and it is best to think of it as simply the blueprint for the page, similar to the blueprints that a builder uses to build a house, it tells the browser what to build, not how to build it.
HTML is a markup language which means that it works by placing tags (sometimes called elements) around the text. These tags provide information about the contents of the tag which the browser is then able to interpret. The tags start with a <
, followed by the tag name and then completed by a >
, eg the paragraph opening tag is <p>
.
Most tags consist of an opening tag, the actual contents and a closing tag (which is the same as the opening tag with /
before the name. eg <p>Some text as the body of the paragraph</p>
Some tags don't have a closing tag and are self closing eg <br />
which is the break tag often used in forms. In HTML5 the backslash here is optional, however during these course notes it will be used for consistency.
The browser ignores the case of the tag but it is good practise for all tags to be lowercase.
When the first web pages were developed in 1991 HTML was the only language for building web pages so it had to do everything. However since then the Cascading Style Sheet (CSS) language has been developed which adds form, structure and styling to web pages and the Javascript language can add actions to web pages. All three are now used in combination to create the web pages of today.
Since 2000 web developers have tried to separate the way web pages are developed using the three languages. This has given rise to the term Semantic Web.
The web is now much more than just web pages, there are many programs which read a web page looking for information. Web developers are now using HTML to build Semantic Web Pages where the tags themselves have meaning beyond the markup. Tag such as nav, header, footer, section have been introduced into the latest version of HTML in response to this. These tags carry semantic meaning as they separate the page structure based upon its meaning. In this course we will concentrate on developing Semantic Web pages, which means that we will think very carefully about which tags we use and how they are used.
Watch this video which introduces the concept
Good web developers separate the parts of the page using the languages of the web to do different tasks. Often these languages are in completely different files.
This course will focus on getting the HTML right, however we will work with both CSS and Javascript. CSS and Javascript will not be the focus of the course nor the assessments.
The usual way to view a web page is using a browser, a program specifically written with the purpose of viewing pages written in the languages of the web. The main browser are:
Web developers tend to use Chrome and Firefox (with the Firebug extension) for developing because those browser provide tools which show the developer what is going on inside the browser. However good web developers develop pages which will work on all browsers and also on all mobile platforms (Iphone and Ipad, Android phones and tablets, Windows phones and tablets etc). This is not easy since it is possible to have a page look great on one device and not work well on others.
In your computing so far you have been working with advanced operating systems (Windows or Mac OS) where the operating system has allowed you to use very long file names. On the Web the pages are stored on Web Servers and sent across the internet using web Routers, some of which use older operating systems. It is important to name your files so that they will also work properly on all these operating systems. This means: