Monday, 11 October 2010

DITA Session 02 More World Wide Web 11-10-2010

Further study of HTML tags which define styles, or attributes, using for example in this code taken from W3C website (Accessed 11-10-2010):

<html>

<body style="background-color:yellow">
<h2 style="background-color:red">This is a heading</h2>
<p style="background-color:green">This is a paragraph.</p>
</body>

</html>

If this was to be applied across more than one page, or column in a table it would need to be written in every document. The Cascading Style sheet is written in a similar from or syntax to HTML, that will define styles such as font colour, font weight, column widths, background colours etc in one file or several files. These are then referenced via a URL in the webpage. This allows the style sheet to be referenced on all pages of a webiste thus making consitents styles and making it easier to maintain or update a whole website. It is the web browser must interpret the CSS file, save it locally then will 'apply presentation rules that they contain to Web documents.

The three components to style sheet syntax:  1. selector  2. property 3. value

eg. define level 1 and 2 headings to be shown centered and coloured blue:

H1, H2 {text-align: center;  color: blue}

Many "selectors" can be listed (comma separated) before the declarations of style.

I am using my website as a tool for trying out HTML and applying style sheets. The of the outcomes from the practical work carried out in session 02, including using HTML tags and CSS are shown by following the link to my personal website on the city university web server: http://www.student.city.ac.uk/~abjb823/DITA02/Index.html

Aside from the practical exercises in the course notes, I will use 2 online HTML tutorials to help HTML and style sheets, W3C Schools and Jalfrezi, links to these references are:
http://www.w3schools.com/html/
http://vzone.virgin.net/sizzling.jalfrezi/iniframe.htm


My next post will be an attempt to summarise concept of the document centered view of information in the context of using the technologies of the Internet, Web Browsers, URLs and associated protocols, HTML and CSS to represent digital information. I shall provide links to the practical work on my website. This will form background for the first part of the Blog Post 1 assessment Web 1.0.

No comments:

Post a Comment