semantic markupspacepod.org/uprising/wp-content/uploads/sites/2/...semantic markup rich semantics...

35
Copyright © 2016, SAS Institute Inc. All rights reserved. SEMANTIC MARKUP WHY AND HOW YOU SHOULD BE USING IT, ALSO GET OFF MY LAWN I’M OLD

Upload: others

Post on 20-Jul-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

SEMANTIC MARKUPWHY AND HOW YOU SHOULD BE USING IT, ALSO GET OFF MY LAWN I’M OLD

Page 2: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

This slide is for video use only.

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

I am not a naturally orderly person.1. WHAT IS SEMANTIC MARKUP?

Page 3: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

This slide is for video use only.

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

VEE VEE BOX / label maker

1. WHAT IS SEMANTIC MARKUP?

Page 4: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

This slide is for video use only.

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

1. WHAT IS SEMANTIC MARKUP?

attribution: “Interstate 40 - North Carolina” by Doug Kerr - https://flic.kr/p/aBFhFu

Page 5: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

SEMANTIC MARKUP A DEEPLY SATISFYING OUTLINE

1. WHAT IS SEMANTIC MARKUP?

Page 6: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

This slide is for video use only.

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

2. WHERE WE CAME FROM

IN 1997 THERE WERE SOME BROWSER LIMITATIONS • NO CSS • NO FONT FORMATTING

Page 7: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

SEMANTIC MARKUP NETSCAPE NAVIGATOR AND A BRAVE NEW WORLD

• The <font> tag • Tiling background images • <blink> and <marquee> • <b> <i> <center>

2. WHERE WE CAME FROM

RICHER FORMATTING WITH NEW TAG SUPPORT IN NETSCAPE

Page 8: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

SEMANTIC MARKUP TABLES FOR LAYOUT

2. WHERE WE CAME FROM

THE BIG ONE! TABLES FOR LAYOUT

(NEED A BETTER TABLE WITH SLICED GRAFX)

Page 9: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

SEMANTIC MARKUP HÅKON WIUM LIE

“We wanted to make sure we had a text-based, semantic-based language underneath there.”

HÅKON WIUM LIE – INVENTOR OF CSS

3. SEPARATION OF CONTENT FROM FORMATTING - CSS

“HOWCOME”

HAWKUM VIUM LEE

image: http://www.flickr.com/people/25347718@N06 Friprog

quote: https://medium.com/net-magazine/interview-with-h%C3%A5kon-wium-lie-f3328aeca8ed#.l37hg9284

Page 10: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

SEMANTIC MARKUP STANDARDS-BASED MARKUP

alistapart.com/article/tohell

3. SEPARATION OF CONTENT AND FORMATTING

STANDARDS-BASED MARKUP

A LIST APART: “WHY HAVE YOU DONE THIS TERRIBLE THING?”

Page 11: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

SEMANTIC MARKUP SEPARATION OF CONTENT AND FORMATTING

Web Standards Solutions

Dan Cederholm – 2004

3. SEPARATION OF CONTENT AND FORMATTING

STANDARDS-BASED MARKUP

- WEB STANDARDS SOLUTIONS “WHY WEB STANDARDS” - CSS ZEN GARDEN

Page 12: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

SEMANTIC MARKUP SEPARATION OF CONTENT AND FORMATTING

CSS Zen Garden

csszengarden.com

3. SEPARATION OF CONTENT AND FORMATTING

CSS ZEN GARDEN - LAUNCHED 2005 BY DAVE SHEA

Page 13: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

This slide is for video use only.

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

4 . WHAT ARE SEMANTICS? HOW ARE THEY EXPRESSED IN MARKUP?

THE PROPER CLASSIFICATION AND LABELING OF THINGS

Page 14: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

SEMANTIC MARKUP OH SO SEMANTIC

<body>

<h1>Cats</h1>

<p>This is a page about cats.</p>

<h2>Short-haired Cats</h2>

<ul><li>Tabby</li><li>American Shorthair</li><li>Siamese</li>

</ul>

<h2>Long-haired Cats</h2>

<ul><li>Persian</li><li>Maine Coon Cat</li>

</ul>

</body>

4 . WHAT ARE SEMANTICS? HOW ARE THEY EXPRESSED IN MARKUP?

THOSE EARLY EFFORTS WERE VERY GOOD ABOUT SEMANTICS, MARKUP DESCRIBED THE CONTENT

Page 15: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5

sectionA generic section of a document, i.e., a thematic grouping of content, typically with a heading

nav

header

footer

developer.mozilla.org

4 . WHAT ARE SEMANTICS? HOW ARE THEY EXPRESSED IN MARKUP?

GOOD STUFF IN HTML5

Page 16: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5

asiderepresents a section of the page with content connected tangentially to the rest

articleself-contained composition in a document, page, application, or site, which is intended to be independently distributable or reusable (e.g., in syndication)

developer.mozilla.org

4 . WHAT ARE SEMANTICS? HOW ARE THEY EXPRESSED IN MARKUP?

GOOD STUFF IN HTML5

Page 17: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

Semantic markup and…

SEMANTIC MARKUP

• Accessibility • Search • Mobile • WordPress

Page 18: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

SEMANTIC MARKUP …AND ACCESSIBILITY

a screen reader has “a conversation with the DOM”

5. HOW DOES THIS HELP SCREEN READERS AND SEARCH ENGINES?

A CONVERSATION WITH THE DOM

Page 19: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

This slide is for video use only.

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

5. HOW DOES THIS HELP SCREEN READERS AND SEARCH ENGINES?

A CONVERSATION WITH THE DOM

Page 20: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

SEMANTIC MARKUP …AND SEARCH

“Design your site to have a clear conceptual page hierarchy.”

support.google.com

search console webmaster guidelines

Page 21: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

SEMANTIC MARKUP …AND WORDPRESS

7. CHALLENGES WHILE WORKING IN WORDPRESS

Page 22: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

This slide is for video use only.

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

7. CHALLENGES WHILE WORKING IN WORDPRESS

Page 23: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

This slide is for video use only.

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

7. CHALLENGES WHILE WORKING IN WORDPRESS

SEMANTICALLY - WHAT IS THIS?

Page 24: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

SEMANTIC MARKUP …AND WORDPRESS

<h3 style="text-align: center;"> <strong> <a href=“/medical/">Medical</a> <a href=“/dental-vision/">Dental/Vision</a> <a href=“/claim-forms/">Benefit Forms</a> <a href=“/cobra/">COBRA</a> </strong></h3>

7. CHALLENGES WHILE WORKING IN WORDPRESS

Page 25: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

This slide is for video use only.

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

7. CHALLENGES WHILE WORKING IN WORDPRESS

Page 26: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

SEMANTIC MARKUP WORDPRESS TACTICS

Gah! What can I do??

7. challenges while working in wordpress

tactical solutions

Page 27: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

This slide is for video use only.

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

7. CHALLENGES WHILE WORKING IN WORDPRESS

SOLUTION: CUSTOM FORMAT

Page 28: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

SEMANTIC MARKUP WORDPRESS SOLUTIONS: FORMATS

codex.wordpress.org/TinyMCE_Custom_Styles

function my_formats( $init_array ) { $style_formats = array ( array( 'title' => 'quote attribution', 'block' => 'cite', 'classes' => '', 'wrapper' => true, ) )}add_filter( ‘tiny_mce_before_init’,‘my_formats’ );

7. CHALLENGES WHILE WORKING IN WORDPRESS

SOLUTION: CUSTOM FORMAT

Page 29: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

This slide is for video use only.

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

7. CHALLENGES WHILE WORKING IN WORDPRESS

SOLUTION: CUSTOM FIELDS IN THE EDITOR

Page 30: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

SEMANTIC MARKUP WORDPRESS SOLUTIONS: CUSTOM FIELDS

• Enforces content structure and good markup • Saved in post meta • What will happen if the site changes theme?

7. CHALLENGES WHILE WORKING IN WORDPRESS

SOLUTION: CUSTOM FIELDS IN THE EDITOR

Page 31: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

SEMANTIC MARKUP

Remember…

• Separate content from formatting • Structure content according to what it is • Think about how it will sound in a screen reader • Think about how it will render in mobile • Provide content owners with the tools they need… • …but don’t leave them out to dry if they change themes

Page 32: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

SEMANTIC MARKUP

LISA LINN ALLEN SAS – INTRANET TEAM LEAD

@LISALINNALLEN SPACEPOD.ORG/UPRISING

Page 33: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

This slide is for video use only.

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

5. HOW DOES THIS HELP SCREEN READERS AND SEARCH ENGINES?

A CONVERSATION WITH THE DOM

Page 34: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

This slide is for video use only.

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

5. HOW DOES THIS HELP SCREEN READERS AND SEARCH ENGINES?

A CONVERSATION WITH THE DOM

Page 35: SEMANTIC MARKUPspacepod.org/uprising/wp-content/uploads/sites/2/...SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5 figure An image, an illustration, a diagram, a code snippet, or

Copyr igh t © 2016 , SAS Ins t i tu te Inc . A l l r i gh ts reserved .

SEMANTIC MARKUP RICH SEMANTICS AVAILABLE IN HTML5

figureAn image, an illustration, a diagram, a code snippet, or a schema that is referenced in the main text.

figcaptionCaption or a legend associated with a figure.

timeTime on a 24-hour clock or a precise date in the Gregorian calendar.

addressSupplies contact information for its nearest <article> or <body> ancestor.

developer.mozilla.org

4 . WHAT ARE SEMANTICS? HOW ARE THEY EXPRESSED IN MARKUP?

GOOD STUFF IN HTML5