Basic Code Pt: 2

In today’s task we looked at creating the first pages of our website by scripting a template page that can be used as a basis to build a complete website that will link page to page across the entire site.

Some of the code used included:

  • <a> – Anchor
  • href – Attribute
  • “” – Value ( To be placed within the inverted commas)
  • Target – Allowing a link to be opened either on the same page, a new tab or a new window entirely. eg: target “_blank”

The code below is modified from that written in task 01, and makes changes to the page by using CSS instructions. The instructions can be contained on the top of each page, but would have to be on each individual page, adding a lot of code & time to your work. However, the CSS instructions can be held on a standalone page with just the link instructions to it on each page. This would allow changes to be made globally from a single point.

The CSS linking code is splaced just after the <Head> tag & can look like this:

<link rel=”stylesheet” type=”text/css” href=”portfolio.css”>

HTML is content – CSS controls that content

The new pages created by this new code are here with the code below. Please note however, a little experimenting was done through W3 Schools to test extra code such as borders & background image placement so it’s a little eh…. messy!!!

Code Pt2 Screenshot

CSS Instructions

h1 {
font-family: “verdana”, arial, sans-serif;
font-size: 20px;
color: #00c0ff;
}
body
{
background-color: #fffe97;
background-image: url(“images/childcare.jpg”);
background-repeat: no-repeat;
background-position: center;
background-size: cover;
border-style: solid;
border-top: thick double;
border-bottom: thick double;

{

Web Page

<!DOCTYPE html>
<html>
<head>

<link rel=”stylesheet” type=”text/css” href=”portfolio.css”>

<title>HTML & CSS</title>
</head>
<body>

<h1>
<em>Welcome to Coláiste Dhúlaigh College of Further Education (CDCFE)</em>
</h1>
<a href=”index.html”>Home</a>
<a href=”cascading.html”>Cascading Style Sheets</a>
<br>

Coláiste Dhúlaigh College of Further Education is located on four campuses, Coolock, Raheny, Kilbarrack and Malahide. CDCFE provides programmes delivered by a team of tutors dedicated to the highest standards of teaching and learning in a caring, supportive and friendly atmosphere. We currently offer over 30 full-time Post-Leaving Certificate courses and have a large part-time provision of Day and evening courses. We want you to succeed and our courses are designed to help our learners achieve their full potential.
<p>
<a href=”http://www.cdcfe.ie/&#8221; target=”_blank”>
<img src=”images/enroll.png” border=”5″>
</a>

</p>

</body>
</html>

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s