Download Designing for digital
Transcript
Carving wooden animals </h1> <div class=”note”> <p> You’ll need a chisel for this chapter. </p> </div> </html> That may suddenly look a lot more complicated. But just take it step by step: The tag <html> tells a machine that this is an HTML document. So the computer knows to follow the rules of HTML when reading it. The tag with the slash </html> says where the HTML document ends. If a web browser sees that document, it knows what to do with it: display the content as a web page. I’ve now got a heading tagged <h1> (for heading-level 1). My note tex t I’ve put in a <div>, for ‘division’. Since a div can be used to mark off any section of tex t, I have to say what kind of div this is. So I’ve put this div in a class I’ve called ‘note’. I can make up my own class names, and I think ‘note’ describes this feature’s function well. A class is an attribute that I use to describe to an element for the computer, like a <p> or a <h1> element, much like an adjective describes an attribute of a noun. 21