Week 3
Separating Form and Content
DOCTYPE:
This is the HTML5 doctype: <!DOCTYPE html>
A doctype is an instruction to the web browser to tell it what version of html the webpage is written in. The doctype needs to be on the first line of the html file. If anything else is before it, even white space, certain browsers will treat the page as if it has no doctype at all.
Lists:
- This is an unordered list
- This is another
- This is an ordered list
- This is another
Angle Brackets:
A left angle bracket (<) would be written as <
A right angle bracket (>) would be written as >
Href:
Written like : <a href="http://www.port.ac.uk">Visit the university website</a>
The href attribute specifies the URL of the page the link goes to. If the href attribute is not present, the <a> tag is not a hyperlink.
The best way to format a document is to use CSS, the CSS tells the browser how to display the content and writing my own CSS sheet will enable me to control the browsers default presentation behaviour
CSS Structural Elements:
- article - A container for any body of text that could stand on its own outside of the page (for example, if syndicated).
- section - Any part of your text that would have a heading that you'd expect to see in the contents.
- header - The page header, often includes the site name and some links.
- footer - Often includes links, licensing and other legal bits.
- nav - Any significant collection of navigational links that could benefit from being highlighted, or skipped in different circumstances.
In CSS, selectors are patterns used to select the element(s) you want to style.
To keep good practice it is best to use external style sheets, this helps reduce web page coding making it easier to maintain your website as all your styles are in the same spot.