Create an initial hard-coded homepage, a page we will use in class to practice other skills. Use a basic text editor and type in the text on the tags page of the HTML session class notes.
Create a folder on your computer and name it task02a, then save the file you will create as index.html in the folder you just created so that it will display as the first page in that directory. This may be the basis of your fuller task 02 website, but it does not have to be. You may wish to use this hard-coded page solely for HTML practice in class, and, later, go on to create a totally individualized, fuller, multi-level personal web site according the specs provided in task 02c.
Let's start with a new web page. Using a text editor of your choice, create a basic page by typing in the code for a basic, well-formed page and save it to the same folder where you saved your original page. It is the very basic code needed to display a page. Note that it is just text at the present. If we want to display it in a browser, we have to save it again with a .htm (or .html) file extension. Go ahead and do it, then open the saved page in your favorite browser. We will make changes to the code using a your preferred text editor, and view our efforts in the browser.
<!DOCTYPE html>
<!--
This is a comment about the DOCTYPE, the html version of which should be specified.
The DOCTYPE in the line above specifies the HTML5 type.
For more see https://www.w3schools.com/tags/tag_doctype.asp
-->
<html lang="en">
<!--
This is a comment about the language attribute. Here the language attribute is specified as having English as its value.
For more see https://www.w3.org/International/questions/qa-lang-why
-->
<head>
<title>page title</title>
</head>
<body>
<p>a paragraph in the body of the page</p>
<!-- this is a comment -->
</body>
</html>
Although we can get away without putting end tags on elements (because many browsers are lax about it), we will adopt the habit of always closing any tag we open so that we are compliant with current and future standards.
<head>
<title> INLS161-001 Spring 2024 Information Tools | Sample Page </title>
<meta name="description" content="sample page for INLS161-001 Spring 2024 Information Tools">
<meta name="keywords" content="information literacy, information tools, information, tasks, hard coding">
<meta charset="UTF-8">
<link rel="stylesheet" href="notyet.sample-style.css">
</head>
add the anchors below to within the body of your local page to create hyperlinks to pages both on and off your website
add the anchors below to within the body of your local page to create hyperlinks to pages that are part of your website
<h1>[enter a name here]</h1>
<h2>This web site has a home page and three subordinate pages.</h2>
<h3>Does this go to the right?</h3>
<p>Specifically, the three subordinate pages are</p>
<ol>
<li>
<a href="02_aboutme.html">About me</a>.
This page will include a hyperlink to a fuller Curriculum Vitae or a résumé.
</li>
<li>
<a href="02_classes.html"> Classes</a>.
This page will include hyperlinks to all the classes I am taking this semester.
<li>
<a href="02_interests.html">Interests</a>.
This page will include an ordered list of items of my interest.
</li>
</ol>
Test it out. Paste your new code into your index file using your text editor and look at it, first in your text editor, and then in your browser of choice. Note that you probably don't already have these other pages. However, if you create them, this page now has a hyperlink to them. You can choose your own page file names; I used these names simply to remind myself that several of the pages are second level pages, while others are third level pages.
add the anchors below to within the body of your local page to create hyperlinks to sections within your website
<h1>[enter a name here]</h1>
<h2>This web site has a home page and three subordinate pages.</h2>
<h3>Does this go to the right?</h3>
<p>Specifically, the three subordinate pages are</p>
<ol>
<li>
<a href="#aboutme">About me</a>.
This section will include a hyperlink to a fuller Curriculum Vitae or a résumé.
</li>
<li>
<a href="#classes"> Classes</a>.
This section will include hyperlinks to all the classes I am taking this semester.
<li>
<a href="#interests">Interests</a>.
This section will include an ordered list of items of my interest.
</li>
</ol>
Note also that we are using some special characters in this HTML code.
For example, résumé is rendered in a browser as
résumé
By 2359 on the day before the CSS session, SFTP the entire task02a folder into your public_html directory on Opal and submit your URL in Canvas assignments. It should read
https://opal.ils.unc.edu/~your-own-onyen/task02a/index.html
Task 02a is required just to compel you to try out hard coding.
Your hard coded page must validate using the W3C Markup Validation Service. There must be no errors in your code.
Copyright © R.E. Bergquist 2014- | Last Updated on | Powered by w3.css