objective • HTML – Review html – Learn to write a basic webpage in html – Understand what the basic building blocks of html are • CSS – Understand the basics of CSS 2019 / 2011 EC [email protected] 2
HTML • HTML – HyperText Markup Language • is the standard markup language used to create web pages. • HTML describes the structure of a website semantically along with cues for presentation – making it a markup language, rather than a programming language. • HTML documents consist of a tree of elements and text. – Each element is denoted in the source by a start tag, such as "<body>", and an end tag, such as "</body>". • Web browsers can read HTML files and render them into visible or audible web pages. 2019 / 2011 EC [email protected] 3
Anatomy of html document 2019 / 2011 EC [email protected] 4 • The <!DOCTYPE html> declaration defines this document to be HTML • The <html> element is the root element of an HTML page • The lang attribute defines the language of the document • The <meta> element contains meta information about the document • The charset attribure defines the character set used in the document • The <title> element specifies a title for the document • The <body> element contains the visible page content • The <h1> element defines a large heading • The <p> element defines a paragraph
Anatomy HTML… • Elements – Elements are designators that define the structure and content of objects within a page. – Enclosed inside angel brackets < and > : E.g. <a> , <p>, <div>, <span>, <strong>, <h1>… – meta information is placed in the head element – content information is placed in the body element • Tags – The use of less-than and greater-than angle brackets surrounding an element creates what is known as a tag . – Tags most commonly occur in pairs of opening and closing tags. • Content of the elements always falls between the opening (e.g. <p>)and closing (e.g. </p>) tag: E.g. <a> …content here…</p> – Certain start tags and end tags can in certain cases be omitted and are implied by other tags.
- Summer '19