New Semantic Elements (Part 2)

Slides:



Advertisements
Similar presentations
Chapter 3 – Web Design Tables & Page Layout
Advertisements

Cascading Style Sheets
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Layout using CSS. Using multiple classes In the head:.important{font-style:italic;}.title{color:red;} In the body: Here's a type of paragraph that is.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Very quick intro HTML and CSS. Sample html A Web Title.
New Semantic Elements (Part 2)
Session 4: CSS Positioning Fall 2006 LIS Web Team.
Advance CSS (Menu and Layout) Miftahul Huda. CSS Navigation MENU It's truly remarkable what can be achieved through CSS, especially with navigation menus.
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
Unit 20 - Client Side Customisation of Web Pages
New Semantic Elements (Part 1). Semantics Explained The textbook definition of "semantics" is the study of the relationship between words and their meanings.
CONCEPTS FOR FLUID LAYOUT Web Page Layout. Website Layouts Most websites have organized their content in multiple columns (formatted like a magazine or.
Lecture Cascading Style Sheets (CSS) Internal Style Sheets Classes.
Purpose Tags are the key to marking up content on your HTML page. It’s the tags that mark up sections of the page and are defined (aesthetically) on the.
IMAGES Controlling size of images in CSS Aligning images in CSS Adding background images.
Chapter 8 More on Links, Layout, and Mobile Copyright © 2013 Terry Ann Morris, Ed.D revised by Bill Pegram, 9/24/
Creating A Simple Web Page. Step 1- Open Dreamweaver & Create A New Page (File New) and blank.
IPUB 100 Lesson 2 Instructor Mark Lamontagne Homework Review.
Building the User Interface by Using HTML5: Organization, Input, and Validation Lesson 3.
Lesson 4: Using HTML5 Markup.  The distinguishing characteristics of HTML5 syntax  The new HTML5 sectioning elements  Adding support for HTML5 elements.
HTML and CSS- Layout. HTML Layout Frame Table – Block HTML5 layout elements.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Week 8 – Part 3 More on Links, Layout, and Mobile Key Concepts 1.
New Semantic Elements (Part 3). The Element The official specification for states that it “represents the heading of a section. The element is used to.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
INTRODUCTION TO HTML5 Semantic Layout in HTML5.  The new semantic layout in HTML5 refers to a new class of elements that is designed to help you understand.
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. word 2010 Chapter 3 Formatting Documents.
>> HTML: Structure Elements. Elements in HTML are either Inline or Block. Block-level Elements – Begins on a new line – Occupy the whole width – Stacks.
Web Design I Spring 2009 Kevin Cole Gallaudet University
Web Design Part I. Click Menu Site to create a new site root.
Internet Technology Dr Jing LU Updated Dr Violet Snell / Dr Kalin Penev 1 Internet Technology (week 6)  Recap: Validating HTML  Page Layout.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
By Lauren Mayer WEBSITE RESEARCH. NYLON MAGAZINE WEBSITE Header, this is the title of the website and should be the main attraction. This example had.
Today’s Lesson….. 1.Formative Assessment Given Back – Go through Answers. 2.Webpage Design.
CONTROLLING Page layout
Web Site Development - Process of planning and creating a website.
Session: 8. © Aptech Ltd. 2Creating Navigational Aids and Division-Based Layout / Session 8  Explain HTML5 semantic tags  Explain HTML5 semantic tag.
BEGINNER WEB DESIGN. INTRODUCTION Vocabulary Design Tools of the Trade HTML CSS.
INT222 – Internet Fundamentals Week 8: Using New HTML features 1.
CONCEPTS FOR FLUID LAYOUT Web Page Layout. Essential Questions What challenges do mobile devices present to Web designers? What are the basic concepts.
HTML5 Semantic
Week 1: Introduction to HTML and Web Design
Cascading Style Sheets for layout
Cascading Style Sheets (CSS) Internal Style Sheets Classes
Introduction to CSS Layout
Web Development & Design Foundations with HTML5 7th Edition
CSS Layouts: Positioning and Navbars
Organizing Content with Lists and Tables
Concepts for fluid layout
Advanced CSS BIS1523 – Lecture 20.
Cascading Style Sheets for layout
AN INTRODUCTORY LESSON TO MAKING A SIMPLE WEB PAGE By: RC Emily Solis
Cascading Style Sheets (Layout)
Web Development & Design Foundations with HTML5 7th Edition
Web Development & Design Foundations with HTML5
Styles and the Box Model
TOPICS Chrome Dev Tools Process for Building a Static Website
Laying out a website using CSS and HTML
Fixed Positioning.
“Semantic” Tags Semantic markup describes what the content contains as opposed to what it looks like! Examples include: div, nav, article, header, footer.
Web Development & Design Foundations with H T M L 5
Web Development & Design Foundations with HTML5
New Semantic Elements (Part 3)
HTML 5 SEMANTIC ELEMENTS.
New Semantic Elements (Part 1)
Web Development & Design Foundations with HTML5
Concepts for fluid layout
Web Programming and Design
HTML5 Tags By Dr Derek Peacock
Presentation transcript:

New Semantic Elements (Part 2)

Three More New HTML5 Elements The <article> element represents web content that could stand by itself, even if separated from the surrounding page information. The <aside> element represents content that is visually set apart from the main content of the page, yet is still somewhat related. The <section> element is a generic area of a web document that groups related content. Along with <header>, <footer>, <nav>, and the all-purpose <div>, these three elements make up the basic building blocks when designing site layouts. Let's look at each one in turn.

The <article> Element The official specification for <article> states that it is “a self-contained composition in a page that is independently distributable or reusable, e.g. in syndication. This could be a forum post, a magazine or newspaper article, a blog entry, or any independent item of content.” The key concept in the above definition is that it is self-contained. The <article> element was designed for content that can be extracted from its containing page and still retain its full value. In HTML5, there can be multiple <article> elements on a web page. In fact, this is fairly common. For example, a typical blog has several different blog posts visible on the home page, with the most recent post at the top. Let's now add an <article> element to our simple web page.

Using the <article> Element Here we have added a short article to the main content area of our page: <article> <h2>Why This Website is Cooler Than Yours</h2> <p>While the rest of the world is stuck in the last decade, this site is built using HTML5.</p> ... </article> And just a little CSS styling: article { margin: 15px; padding: 10px; background-color: #EEEEEE; }

The <aside> Element The official specification for <aside> is “a section of a page that consists of content that is tangentially related to the content around it, and which could be considered separate from that content. Such sections are often represented as sidebars in printed typography.” It goes on to state that <aside> “can be used for effects like sidebars, for advertising, for groups of nav elements, and for other content that is considered separate from the main content of the page.” The most common uses of <aside> are for links to external websites, for advertising, and for "About Us" or "Contact Us" sidebars. An <aside> can be nested within an <article> if its content applies specifically to that article. We'll now add an <aside> to our sample web page.

Using the <aside> Element We've added an <aside> box inside our article and inserted an image and external links: <aside> <img src="images/html5-logo.png" alt="HTML5 Logo"> <h3>External Resources:</h3> <ul> <li> <a href="http://dev.w3.org..."> HTML5 Specification</a> </li> ... </aside> And used CSS to float the box to the right: aside { width: 200px; float: right; background-color: #CCFFFF; ... } Don't confuse a list of external links as a <nav> section. The <nav> element is for navigating within our own site.

The <section> Element The official specification for <section> is “generic section of a document. A section, in this context, is a thematic grouping of content, typically with a heading.” A common use of <section> is to contain a group of articles. The <section> element is an element of last resort, to be used only if the other semantic options (<header>, <footer>, <nav>, <article>, <aside>) are not appropriate. If the sole purpose is for styling, it is improper to use the <section> element, as there is no semantic value. Use the generic <div> instead. Let's add a <section> element to our existing page.

Using the <section> Element We've inserted a <section> element to contain our article: <section> <h2>Home Page</h2> <article> <aside> ... </aside> </article> </section> And CSS to change the background color: section { background-color: #FFFFCC; padding: 5px; } We could now add more articles to be contained within the main <section>.

Site Layouts Using HTML5 We have now covered all the basic building blocks for laying out HTML5-based websites: Let's experiment now with these building blocks to explore different ways to create site layouts. Don't forget that the <div> element is still a common component when designing web page layouts in HTML5. For this lesson, though, we are focusing on the new semantic elements.

Example Site Layouts This layout closely resembles the sample page we just created during this lesson. However, there is one difference. Note that the <aside> applies to the entirety of the main content, not to a specific article. This <aside> might contain "About Us" or "Contact Us" content, for example. This layout is similar to the first, but moves the navigation menu out of the header and to the left column. Also, each article has its own aside, which might contain links, advertisements, or a quote pulled from the main article.

More Site Layouts This layout has two navigation menus, one at the very top of the page, and one in the footer section. This is not at all unusual, as many sites give visitors more than one way to click to other areas of the site. Also, notice that this page contains no articles or asides. Instead, there are three <section> elements. These might be an introduction, a main content area, and a conclusion. Some layouts can be much more complex and use multiple instances of elements. Notice on this layout that each article has its own header, footer, and aside. This is a fairly common practice, as articles are designed to be syndicated to other sites, and the original creators of the article want to include such things as company logos, contact info, and copyright details.

Semantic Elements in Site Layout There is no "right way" to create a website layout in HTML5. The best approach is to use the semantic elements, within their intended purposes, in the way that presents our page content most effectively to our audience. Any of the semantic elements - <header>, <footer>, <nav>, <article>, <aside>, and <section> - can be used multiple times within the same page. They can also be nested one within another. We can still use <div> elements in HTML5 but only when they are being used solely for styling purposes or when there is no better choice among the semantic elements.