New Semantic Elements (Part 3)

Slides:



Advertisements
Similar presentations
HTML Basics Customizing your site using the basics of HTML.
Advertisements

Neal Stublen Content Models  Metadata content Data not necessarily presented on the page ○ title, link, meta, style  Flow content.
Unit 3 Day 4 FOCS – Web Design. No Journal Entry.
Cascading Style Sheets
HTML Overview - Cascading Style Sheets (CSS). Before We Begin Make a copy of one of your HTML file you have previously created Make a copy of one of your.
New Semantic Elements (Part 2)
Tutorial 4: Creating page layout with css
New Semantic Elements (Part 1). Semantics Explained The textbook definition of "semantics" is the study of the relationship between words and their meanings.
Using HTML Tables.
Art 128 Interface Programming 1 In-class Presentation Week 11B.
CSS (Cascading Style Sheets): How the web is styled Create Rules that specify how the content of an HTML Element should appear. CSS controls how your web.
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/
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Lesson 4: Using HTML5 Markup.  The distinguishing characteristics of HTML5 syntax  The new HTML5 sectioning elements  Adding support for HTML5 elements.
.  Entertain  Inform  Educate  Blogs  Sell  Date  Gamble  Religion.
Week 8 – Part 3 More on Links, Layout, and Mobile Key Concepts 1.
IDs versus Classes Naming Your Tags for Maximum Functionality.
1 CSC 121 Computers and Scientific Thinking David Reed Creighton University HTML and Web Pages.
Lesson 2 Adding more content to your web page. Thanks to Richard Hudnutt, Luella HS.
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.
Introduction to HTML. What is a HTML File?  HTML stands for Hyper Text Markup Language  An HTML file is a text file containing small markup tags  The.
INTRODUCTION. What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML is not a programming language,
Designing a Web Page with Tables. A text table: contains only text, evenly spaced on the Web page in rows and columns uses only standard word processing.
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.
HTML: Hyptertext Markup Language Doman’s Sections.
>> HTML: Structure Elements. Elements in HTML are either Inline or Block. Block-level Elements – Begins on a new line – Occupy the whole width – Stacks.
CIS234A- Lecture 7 Instructor Greg D’Andrea. Tables A table can be displayed on a Web page either in a text or graphical format. A text table: – contains.
HTML ( HYPER TEXT MARK UP LANGUAGE ). What is HTML HTML describes the content and format of web pages using tags. Ex. Title Tag: A title It’s the job.
WEB DEVELOPMENT IMMERSIVE BUILDING PAGE LAYOUTS. 2 Box Model Scaling Positioning Boxes Box Aesthetics HTML 5 Semantic Tags CSS Resets TOPICS GENERAL ASSEMBLYWEB.
Web Design (12) CSS Introduction. Cascading Style Sheets - Defined CSS is the W3C standard for defining the presentation of documents written in HTML.
1 Preparation for site Create a folder in MyDocuments: beavercheese. Create a subfolder, images Classes, career, DW beginner Download.
BEGINNER WEB DESIGN. INTRODUCTION Vocabulary Design Tools of the Trade HTML CSS.
HTML5 and CSS3 Illustrated Unit C: Getting Started with CSS.
INT222 – Internet Fundamentals Week 8: Using New HTML features 1.
HTML5 and CSS3 Illustrated Unit F: Inserting and Working with Images.
HTML5 Semantic
Cascading Style Sheets for layout
Cascading Style Sheets (CSS) Internal Style Sheets Classes
INTRO TO WEB DEVELOPMENT html
Cascading Style Sheets Layout
CNIT 131 HTML5 - Tables.
4.01 Cascading Style Sheets
Webpage layout using CSS
Inserting and Working with Images
HTML.
Intro to Dreamweaver Web Design Section 8-1
INTRODUCTION TO HTML AND CSS
Float.
Cascading Style Sheets for layout
AN INTRODUCTORY LESSON TO MAKING A SIMPLE WEB PAGE By: RC Emily Solis
Programming the Web using XHTML and JavaScript
HTML Images CS 1150 Spring 2017.
Styles and the Box Model
TOPICS Chrome Dev Tools Process for Building a Static Website
“Semantic” Tags Semantic markup describes what the content contains as opposed to what it looks like! Examples include: div, nav, article, header, footer.
Browser Support for HTML5
Using HTML Tables SWBAT: - create tables using HTML
Basic HTML and Embed Codes
Putting An Image on Your Web Page
INTRODUCTION TO HTML AND CSS
Float.
HTML Images CS 1150 Fall 2016.
New Semantic Elements (Part 2)
Understand basic HTML and CSS terminology, concepts, and basic operations. Objective 3.01.
New Semantic Elements (Part 1)
Images in HTML PowerPoint How images are used in HTML
Lesson 3: Cascading Style Sheets (CSS) and Graphical Elements
4.01 Cascading Style Sheets
HTML5 Tags By Dr Derek Peacock
Presentation transcript:

New Semantic Elements (Part 3)

The <hgroup> Element The official specification for <hgroup> states that it “represents the heading of a section. The element is used to group a set of h1–h6 elements when the heading has multiple levels, such as subheadings, alternative titles, or taglines.” The value of <hgroup> is that we can have a prominent headline or title, along with a less-prominent one, and indicate that they belong together. In prior versions of HTML, a browser had no way of making this distinction when encountering <h1> through <h6> elements. Here are two simple examples: The Hobbit, or There and Back Again My Awesome Blog: Random Thoughts on a Million Topics

Using the <hgroup> Element Let's begin building the second page of our website and make it about book reviews: <h2>My First Book Review</h2> <hgroup> <h3>Frankenstein:</h3> <h4>or, The Modern Prometheus</h4> </hgroup> <p>I had seen the movie... ... Some of the CSS: hgroup h3 { font-size: 22px; font-style: italic; ... } Be careful not to place any elements other than <h1> through <h6> headings inside the <hgroup> tags. Nothing else is permitted.

The <figure> Element The specification for <figure> states that it “represents a unit of content, optionally with a caption, that is self-contained, and typically referenced as a single unit from the main flow of the document, which can be moved away from the main flow of the document without affecting the document’s meaning.” Unlike the <aside> element, <figure> contains content (e.g. a photo, diagram, or illustration) that is directly relevant to the main content. A <figure> should be capable of being moved around on the page without "breaking" the meaning of the page. Many images do not qualify to use the <figure> element and should continue to use the basic <img> element. Examples include logos, site graphics, and content that must be placed in a specific location on the page.

Using the <figure> Element Let's return to our book review page and add an image of the original book cover: <figure> <img src="images/frankenstein1818.jpg" height="200" width="113" alt="Original Frankenstein book cover from 1818"> </figure> <hgroup> ... And use CSS to float the image to the right: figure { float: right; } So far, this has not added much value to us from a web design standpoint. But that all changes once we add a caption to the image.

The <figcaption> Element <figcaption> is an optional element that can be added to a <figure>. It provides a caption or legend for an image, illustration, or diagram. The <figcaption> element must be nested within the <figure> element and there can be just one instance used within a single <figure>. If placed before the <img> element, it will appear above the image. If after the <img> element, it will appear directly below the image. Let's now add a caption to the book cover image we inserted.

Using <figcaption> We have added a caption to appear directly below the book cover image: <figure> <img src="images/frankenstein1818.jpg" height="200" width="113" alt="Original Frankenstein book cover from 1818"> <figcaption>1818 Book Cover</figcaption> </figure> ... <figure> <img src="images/frankenstein1818.jpg" height="200" width="113"> </figure> <hgroup> ... And used CSS to style the caption: figcaption { font-style: italic; font-size: 16px; }

Multiple images within <figure> Though only one <figcaption> may be used, there is no limitation to the number of <img> elements within a <figure> element: <figure> <img src="images/frankenstein1818.jpg" height="200" width="113" alt="..."> <img src="images/frankenstein1869.jpg" height="200" width="132" alt="..."> <img src="images/frankenstein1981.jpg" height="200" width="124" alt="..."> <figcaption>Book covers from 1818, 1869, and 1981 (left to right)</figcaption> </figure> ... Prior to HTML5, adding captions to images, especially multiple images like this example, required us to use <div> elements and apply much more CSS styling to position the caption.

Using CSS Classes Throughout these examples - and in many of our class projects - we apply CSS styling directly to elements such as <header>, <section>, and <figure>. In the real world, this is rarely done. We might have multiple instances of these elements on a single page and if we style the element directly, those CSS declarations will affect all instances. What if we wanted one <figure> to float left and another to float right? The solution is to assign a CSS class to each instance of an element: <figure class="diagram1"> ... </figure> <figure class="diagram2"> Now we can style each <figure> individually by styling its specific CSS class.