Dr. Mark Humphrys

School of Computing. Dublin City University.

Home      Blog      Teaching      Research      Contact

Online coding site: Ancient Brain

coders   JavaScript worlds

Search:

CA170      CA668      CA686

Online AI coding exercises

Project ideas


Coding a webpage with HTML tags



Minimalist web page


<html>
<head>
<meta charset="UTF-8">
<title> My web page </title>
</head>
<body>

<h1> My web page </h1>

<p> I am a very interesting person
and here are my poems. </p>

<p> Here is a link to my favourite artist,
<a href="http://danielodonnell.org/"> Daniel O'Donnell</a>.
I hope to marry him some day. </p>

</body>
</html>

Exercise: Copy this into your own web page and view it.



HTML

  1. HTML is not programming.
  2. Rather it is something called "markup". Defines sections of content.

  3. Browsers are forgiving:
    • Case of tags doesn't matter. Blank space and new lines are all compressed.
    • You can probably leave out the <html> tags, and also the closing </body> and </html> - all browsers can display partial downloads.
    • Also <p> starts a new paragraph no matter what, so you can leave out the </p> tags.
    • We could say "HTML is forgiving", but it's more accurate to say that browsers are forgiving. The HTML spec can say what it likes - the browsers will still forgive errors.
    • See discussion of this under XHTML.

  4. Open source model:
    • Source is interpreted on client side.
    • Can "View .. Source" on other people's pages to get ideas.



Some common tags




Some HTML tags.


  

Reference



ancientbrain.com      w2mind.org      humphrysfamilytree.com

On the Internet since 1987.

Wikipedia: Sometimes I link to Wikipedia. I have written something In defence of Wikipedia. It is often a useful starting point but you cannot trust it. Linking to it is like linking to a Google search. A starting point, not a destination. I automatically highlight in red all links to Wikipedia and Google search and other possibly-unreliable user-generated content.