This week we’re getting stuck into ordered and unordered lists, images, and links. So far so good - making sense and output on screen looks correct so far. In this example I am using a single-entry unordered list <ul> (Female Cats) to introduce a selection of popular names presented in an ordered list <ol>. Very basic indeed but another milestone on the structural journey - learning how items are sequenced on the page before style elements are applied. In the first example the html isn’t very pretty. I should have put the ordered list nested inside the unordered list. Have a look at the 3rd image to see the updated structure and the 4th shows the tweaked code to get the nicer display.
This week we also looked at how to represent and manipulate links - understanding the difference between relative and absolute links, calling a link from within a site, referencing an external link, opening in a new browser window using the ‘target’ attribute. Why would you ever want to send someone away from your site (i.e. not in a new window) when you spend big money on SEO to get a visitor to your site in the first place!
Finally we learned about <id> attributes of elements. Handy way to break up a long page (see Wikipedia for example). Not only does it help with on-page navigation, using id attributes allows you to link to specific sections of a page inside a standard <a href= > construct. Let’s look at that --> here is a standard H2 sub heading block level element with a specific id attribute called “Mailing Address”
<h2 id="Mailing_address">Mailing address</h2>.
By pinpointing a section within a long page with this attribute and then calling on that attribute using “#” in a link it allows us to jump directly to that section on that page from.....anywhere!
<p>Want to write us a letter? Use our <a href="contacts.html#Mailing_address">mailing address</a>.</p>
Beautiful stuff. Keep it coming, we are making progress!















