Unit 21 - Website Authoring
Unit 21 - Website Authoring
1
What is a website?
Website Authoring
A website is a collection of individual but related web pages that are often stored together and hosted by a web
server. Web pages can include different objects such as text, sound, video and still images.
What is HTML?
HTML is an abbreviation for HyperText Markup Language. It is a text-based language used to develop the content
layer of websites. Files are written in HTML using a simple text editor with an .htm (or .html) file extension.
Head and body two sections of the webpage.
The head section
• Starts with <head> and closes with </head>. Objects between these tags are not displayed by the web browser.
The Only a tags that are accepted within the head section of a web page are <base>, <link>, <meta>, <title>,
<style> and <script>.
• The head section should always contain a title. This is the name displayed in the browser toolbar.
The body section
Starts with <body> and closes with </body> and objects between these tags are displayed in the web page.
Relative file path When creating a hyperlink reference to another file, particularly one stored locally, it is really
important to use a relative file path.
Absolute file path It is a full path which points to the same location in a file system regardless of the current
working directory. Absolute paths use URLs that refer to a very specific location on the Internet. These paths will
include a domain name as part of the link path itself. (email hyperlinks for example) 2
Website Authoring
Add comments to your HTML markup <!-- and end with -->
HTML tags:
• Apply tags <p> and ended with </p>
• Six heading styles are available and are defined with the style names <h1> to <h6>
• Bulleted(<ul>) or numbered(<ol>) list can be defined with the <li> tag and finished with </li>
• Superscript <sup> and </sup>
• Subscript <sub> and </sub>
• Tables <table> </table>
• Rows <tr> </tr>
• Table data(Columns) <td> </td>
• Caption allows you to display a caption above the table and it should be the first HTML tag after the <table> tag
<caption> </caption>
• Table borders with <table> tag, the table is initiated but have no visible border. The word ‘border’ is an
attribute(further information). Attributes should be in lower case the values should always be enclosed in
quotes.
• Tables can have three sections: a header, a footer and a body section in this order only. These are defined using
the <thead>, <tfoot> & , <tbody> tags, and closed with </thead>, </tfoot> and </tbody> respectively. Notice
how these all begin with t (for table). Within each section add the correct number of table rows. You can add the
table data sections to the footer and body of the table using the tags <td> and </td>. Do not use these tags in
the table header instead In the table header, create heading cells using the tags <th> and </th> rather than the
table data tags
• Resize a table with attribute style width . Example: style="height:50px; width:400px“. These are embedded
styles
• Common in-style/embedded styles are style=“text-align:center; width:80%; margin-left:auto; margin-
right:auto; border-collapse:collapse; border:solid 4px #FFFF00; vertical-align:middle; ”
• Column merge colspan=“3” and rows merge rowspan=“4”
• Add an ID attribute to each table so we can identify them: they will be called top, middle and bottom. Example:
<table border="1" id="middle" style="padding:25px">
3
HTML tags:
Website Authoring
insert image <img src="turtle.jpg" alt="Company Logo“ width=“300px” height=“100px”>
Raster or bitmap graphics are JPEG files, GIF files or PNG
Vector graphics SVG
Insert a video file:
<video width=“300px” height=“240px” controls>
Your browser does not support this type of video
<source src=“abc.mp4” type=“video/mp4”>
</source>
</video>
Insert an audio file:
<audio controls>
Your browser does not support this type of audio file.
<source src="whale.mp3" type="audio/mpeg">
</audio>
4
HTML tags:
Website Authoring
hyperlink to emails
p><a href="mailto:graham.a.brown@hotmail.co.uk?subject=IGCSE%20Book">Click here to contact us
page</a></p>
If the subject has space between it, it should be written using %20
Email id and subject are separated by ?
Use metatags
It uses the <meta> tag to open it and the </meta> tag to close it. We will use only three attributes with the <meta>
tag, these are: charset, name and content.
UTF-8, which is for Unicode, and ISO-8859-1, which is for the Latin alphabet.
<meta charset="UTF-8">
<meta name="author" content="Graham Brown">
<meta name="description" content="Advice for practical web page creation">
<meta name="keywords" content="HTML, web page creation, web development, stylesheet, WYSIWYG">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Set a default target window (place in the head section of the page)
<base target=" _ blank">
Apply styles and classes to the HTML (see the following example:)
<body>
<h1>Chapter 21</h1><hr>
<h2 id="top">Advice for practical webpage creation</h2>