Coding a webpage with HTML tags
Minimalist web page
<title> My web page </title>
<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>
Exercise: Copy this into your own web page and view it.
is not programming.
- Rather it is something called "markup".
Defines sections of content.
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
- all browsers can display partial downloads.
starts a new paragraph no matter what,
so you can leave out the
- 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
- Open source model:
Source is interpreted on client side.
"View .. Source"
on other people's pages
to get ideas.
Some common tags
- List of HTML elements at w3schools
- Commonly used:
html, head, meta, title, body
link, style, script
h1, h2, etc.
p, br, hr
ol, ul, li
- Commonly used, though frowned upon:
- Other common tags:
form, input, select, option, button
table, tr, td
Some HTML tags.