Main Epub Template
Basic headers
For chapters. See Specific Pages for front and back matter sections
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" lang="en-US" xml:lang="en-US">
<head>
<title>Chapter XX</title>
<link href="css/styles.css" rel="stylesheet" type="text/css"/>
</head>
<body epub:type="bodymatter">
<section epub:type="XXX" role="doc-XXX" aria-labelledby="ID_XX">
<h1 epub:type="title" id="ID_XX">CHAPTER_NUMBER</h1>
...
</section>
</body>
</html>
content.opf
See also opf template
Language declaration
<package version="3.0" unique-identifier="bookid" prefix="schema: http://schema.org/ rendition: http://www.idpf.org/vocab/rendition/# ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/" xmlns="http://www.idpf.org/2007/opf" xml:lang="en-US">
Titles and subtitles
<dc:title id="title">The_TITLE</dc:title>
<meta property="file-as" refines="#title">TITLE, The</meta>
<meta property="title-type" refines="#title">main</meta>
<dc:title id="subtitle">THE_SUBTITLE</dc:title>
<meta property="title-type" refines="#subtitle">subtitle</meta>
<dc:title id="fulltitle">The_TITLE: THE_SUBTITLE</dc:title>
<meta property="file-as" refines="#fulltitle">TITLE: THE_SUBTITLE, The</meta>
<meta property="title-type" refines="#fulltitle">extended</meta>
Series and Collections
https://www.w3.org/publishing/epub32/epub-packages.html#sec-belongs-to-collection
<meta property="belongs-to-collection" id="id-1">Orca SERIES_TITLE</meta>
<meta refines="#id-1" property="collection-type">series</meta>
<meta refines="#id-1" property="group-position">1</meta>
- collection-type options: series | set
Creators
<dc:creator id="creator1">AUTHOR_FIRST__LAST</dc:creator>
<meta refines="#creator1" property="role" scheme="marc:relators">aut</meta>
<meta refines="#creator1" property="file-as">AUTHOR_LAST, AUTHOR_FIRST</meta>
<dc:creator id="illustrator1">ILLUS_FIRST__LAST</dc:creator>
<meta refines="#illustrator1" property="role" scheme="marc:relators">ill</meta>
<meta refines="#illustrator1" property="file-as">ILLUS_LAST, ILLUS_FIRST</meta>
Translator
<dc:contributor id="contributor1">TRANSLATOR_FIRST__LAST</dc:creator>
<meta refines="#contributor1" property="role" scheme="marc:relators">trl</meta>
<meta refines="#contributor1" property="file-as">TRANSLATOR_LAST, TRANSLATOR_FIRST</meta>
Identifier, source and publisher
<dc:identifier id="epubISBN">9780000000000</dc:identifier>
<dc:identifier id="bookid">urn:isbn:9780000000000</dc:identifier>
<dc:source id="printISBN">9780000000000</dc:source>
<dc:publisher>Orca Book Publishers</dc:publisher>
Language, Pub Date & Rights
<dc:language>en-US</dc:language>
<dc:date>2023-MO-DA</dc:date>
<dc:rights>Copyright © INSERT_YEAR AUTHOR_NAME</dc:rights>
<dc:rights>Copyright © Text INSERT_YEAR AUTHOR_NAME, Illustrations INSERT_YEAR ILLUS_NAME</dc:rights>
Description
- from Booksonix
- must be plain text or escaped html
<dc:description><p>THIS_IS_THE_DESCRIPTION</p></dc:description>
Accessibility schema
<meta property="schema:accessMode">textual</meta>
<meta property="schema:accessMode">visual</meta>
<meta property="schema:accessModeSufficient">textual</meta>
<meta property="schema:accessModeSufficient">textual, visual</meta>
<meta property="schema:accessibilityFeature">displayTransformability</meta>
<meta property="schema:accessibilityFeature">pageBreakMarkers</meta>
<meta property="schema:accessibilityFeature">readingOrder</meta>
<meta property="schema:accessibilityFeature">structuralNavigation</meta>
<meta property="schema:accessibilityFeature">ARIA</meta>
<meta property="schema:accessibilityFeature">tableOfContents</meta>
<meta property="schema:accessibilityFeature">alternativeText</meta>
<meta property="schema:accessibilityFeature">index</meta>
<meta property="schema:accessibilityHazard">none</meta>
(For complex images)
<meta property="schema:accessibilityFeature">longDescription</meta>
Note: <meta property="schema:accessMode">visual</meta>
is/should be deleted for publications with only a cover image
Note: <meta property="schema:accessModeSufficient">textual</meta>
is only for publications with described images
WCAG Summary (See above)
Note: accessibilitySummary
metadata as it is no longer a requirement and should supplement the existing accessibility metadata already present and not duplicate it.
NOTE 450 chars max. No alt text:
<meta property="schema:accessibilitySummary">This publication conforms to WCAG 2.0 Level AA except for incomplete alt descriptions.</meta>`
Accessible version:
<meta property="schema:accessibilitySummary">A simple book with some images. This book contains various accessibility features such as alternative text for images, table of contents, page list, landmark, reading order, structural navigation, and semantic structure. A digital rights page has been added and number of blank pages in the print equivalent book have been removed from this digital EPUB. This publication conforms to WCAG 2.0 Level AA.</meta>
Accessible Non-fiction:
<meta property="schema:accessibilitySummary">An illustrated book with many images. This book contains various accessibility features such as alternative text for images, table of contents, page-list, landmarks, reading order, structural navigation and semantic structure. A digital-rights page has been added and a number of blank pages in the print equivalent book have been removed from this digital EPUB. Some images and sidebars may not appear on their original pages in order to accommodate the ebook’s recomposability. This publication conforms to WCAG 2.0 Level AA.</meta>
Extras
(If there is at least a 7:1 contrast ratio) <meta property="schema:accessibilityFeature">highContrastDisplay</meta>
<meta property="schema:accessibilityFeature">index</meta>
REMOVE: not valid as Orca uses DRM
<meta property="schema:accessibilityFeature">unlocked</meta>
(Not supported yet)
<meta property="schema:accessibilityFeature">pageNavigation</meta>
For equations
<meta property="schema:accessibilityFeature">MathML</meta>
Textual descriptions of math equations are included, whether in the alt attribute for image-based equations, using the alttext attribute for [MathML] equations, or by other means.
<meta property="schema:accessibilityFeature">describedMath</meta>
fixed epub metadata
https://www.w3.org/TR/epub-fxl-a11y/#a11y-metadata-childrens-book
<meta property="schema:accessMode">visual</meta>
<meta property="schema:accessMode">textual</meta>
<meta property="schema:accessModeSufficient">visual,textual</meta>
<meta property="schema:accessModeSufficient">textual</meta>
<meta property="schema:accessibilityFeature">alternativeText</meta>
<meta property="schema:accessibilityFeature">readingOrder</meta>
<meta property="schema:accessibilityHazard">none</meta>
<meta property="dcterms:conformsTo" id="conf">EPUB Accessibility 1.1 - WCAG 2.1 Level A</meta>
<meta property="a11y:certifiedBy" refines="#conf">Acme Publishing Inc.</meta>
<meta property="schema:accessibilitySummary">
This publication conforms to all the success criteria of WCAG 2.1 AA with the exception of success criteria that cannot be met using fixed layout formatting. This includes text resizing and text reflow.
</meta>
non-remediated fixed ePubs
<meta property="schema:accessMode">visual</meta>
<meta property="schema:accessModeSufficient">visual</meta>
<meta property="schema:accessibilityFeature">unknown</meta>
<meta property="schema:accessibilitySummary">
This publication has not been accessibility tested, or had remediation work done. If there are any questions about this book's content, or an urgent need for an accessible edition of this book, please contact us at digital@orcabook.com.
Benetech Conformance
Conformance/Evaluation/Certification
New Version:
<meta property="dcterms:conformsTo" id="conf"> EPUB Accessibility 1.1 - WCAG 2.1 Level AA </meta>
<meta property="a11y:certifiedBy" refines="#conf" id="certifier">Benetech via eBOUND Canada</meta>
<meta property="a11y:certifierCredential" refines="#certifier"> https://bornaccessible.org/certification/gca-credential/</meta>
Old Version
<link rel="dcterms:conformsTo" href="http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-aa"/>
<meta property="a11y:certifiedBy">Benetech via eBOUND Canada</meta>
<meta property="a11y:certifierCredential">https://bornaccessible.org/certification/gca-credential/</meta>
Self Certification
<dc:publisher>Publisher Name</dc:publisher>
<meta property="a11y:certifiedBy">Publisher Name</meta>
check
<meta property="dcterms:modified">2023-03-09T10:13:19Z</meta>
<meta content="cover-image" name="cover"/>
<item id="cover-image" href="images/9781551439839.jpg" media-type="image/jpeg" properties="cover-image"/>
<meta property="ibooks:specified-fonts">true</meta>
Spine
- remove nav.xhtml
<itemref idref="nav.xhtml" linear="no"/>
Nav ToC, Landmarks, Pagelist
<nav id="toc" epub:type="toc" role="doc-toc" aria-labelledby="nav_contents">
<h1 id="nav_contents">Contents</h1>
<ol>
<li><a href="cover.xhtml">Cover</a></li>
<li><a href="halftitle.xhtml">Half Title Page</a></li>
<li><a href="digitalrights.xhtml">Digital Rights</a></li>
<li><a href="titlepage.xhtml">Title Page</a></li>
<li><a href="copyright.xhtml">Copyright Page</a></li>
<li><a href="dedication.xhtml">Dedication</a></li>
<li><a href="epigraph.xhtml">Epigraph</a></li>
<li><a href="opening.xhtml">Opening</a></li>
<li><a href="series.xhtml">Series</a></li>
<li><a href="contents.xhtml">Contents</a></li>
<li><a href="foreword.xhtml">Foreword</a></li>
<li><a href="prologue.xhtml">Prologue</a></li>
<li><a href="introduction.xhtml">Introduction</a></li>
<li><a href="chapter-01.xhtml">Chapter One</a>
<ol>
<li><a href="chapter-01.xhtml#_id">Section1</a></li>
</ol>
</li>
<li><a href="epilogue.xhtml">Epilogue</a></li>
<li><a href="glossary.xhtml">Glossary</a></li>
<li><a href="resources.xhtml">Resources</a></li>
<li><a href="index.xhtml">Index</a></li>
<li><a href="acknowledgments.xhtml">Acknowledgments</a></li>
<li><a href="authors-note.xhtml">Author's Note</a></li>
<li><a href="endnotes.xhtml">Endnotes</a></li>
<li><a href="about-the-author.xhtml">About the Author</a></li>
<li><a href="morebooks.xhtml">More Great Reads</a></li>
<li><a href="morecurrents.xhtml">More Currents</a></li>
<li><a href="moreechoes.xhtml">More Echoes</a></li>
<li><a href="excerpt.xhtml">An Excerpt from XXX by XXX</a></li>
</ol>
</nav>
<nav id="page-list" epub:type="page-list" role="doc-pagelist" aria-labelledby="nav_pagelist">
<h1 epub:type="title" id ="nav_pagelist">Page List</h1>
<ol>
<li><a href="cover.xhtml#pagei">i</a></li>
<li><a href="digitalrights.xhtml#pageii">ii</a></li>
<li><a href="titlepage.xhtml#page1">1</a></li>
<li><a href="copyright.xhtml#page2">2</a></li>
<li><a href="dedication.xhtml#page3">3</a></li>
<li><a href="introduction.xhtml#page6">6</a></li>
<li><a href="chapter-1.xhtml#page8">8</a></li>
<li><a href="acknowledgements.xhtml#page48">48</a></li>
</ol>
</nav>
<nav id="landmarks" epub:type="landmarks" aria-labelledby="nav_landmarks">
<h1 id="nav_landmarks">Landmarks</h1>
<ol>
<li><a epub:type="cover" href="cover.xhtml">Cover</a></li>
<li><a epub:type="frontmatter" href="digitalrights.xhtml">Statement of Digital Rights</a></li>
<li><a epub:type="toc" href="contents.xhtml">Contents</a></li>
<li><a epub:type="frontmatter" href="introduction.xhtml">Introduction</a></li>
<li><a epub:type="bodymatter" href="chapter-01.xhtml">BOOK_TITLE</a></li>
<li><a epub:type="backmatter" href="resources.xhtml">Resources</a></li>
<li><a epub:type="backmatter" href="about-the-author.xhtml">About the Author</a></li>
<li><a href="excerpt.xhtml" epub:type="backmatter">Excerpt</a></li>
</ol>
</nav>
Image Disclaimer
- first image (dedication or contents)
- edit to add style
All images in this book are PHOTOGRAPHS_ILLUSTRATIONS unless otherwise stated. The illustrations and/or photos in this book reflect diversity in race, ethnicity, culture, nationality, geographical setting, religion, age, ability, sex, sexual orientation, gender identity and class. Out of respect for that authentic diversity, the alt text has been written without making any assumptions about the identities of people and/or characters depicted in the photos and/or illustrations. The illustrations in this book are drawn INSERT_STYLISTIC_STATEMENT.
AI disclaimer
All rights are reserved, including those for text and data mining, AI training and similar technologies.
Specific Pages
<body>
tags
<body epub:type="frontmatter">
<body epub:type="bodymatter">
<body epub:type="backmatter">
Sections & ARIA roles
Double check if it should be aria-label=""
or aria-labelledby=""
. Generally use aria-labelledby
if there is an existing <h1>
or <h2>
<nav aria-labelledby="nav_contents" epub:type="toc" role="doc-toc">
<h1 id="nav_contents">Table of Contents</h1>
<nav aria-labelledby="nav_pagelist" epub:type="page-list" role="doc-pagelist">
<h1 id="nav_pagelist">Print Page List</h1>
<nav aria-labelledby="nav_landmark" epub:type="landmarks">
<h1 id="nav_landmark">Landmarks</h1>
<section aria-label="cover">
<section epub:type="toc" role="doc-toc">
<section epub:type="pagelist" role="doc-pagelist">
<section aria-label="Digital Rights" class="digitalrights">
<section epub:type="halftitlepage">
<section epub:type="titlepage">
**Note** aria-label is necessary if there is no h1
<section epub:type="titlepage" aria-label="Title Page">
<section epub:type="copyright-page" aria-label="Copyright">
<section epub:type="toc" role="doc-toc" aria-label="Table of Contents">
<section epub:type="dedication" role="doc-dedication" aria-label="Dedication">
<section epub:type="epigraph" role="doc-epigraph" aria-label="Epigraph">
<section epub:type="preface" role="doc-preface" aria-labelledby="id_preface">
<section epub:type="foreword" role="doc-foreword" aria-label="Foreword">
<section epub:type="introduction" role="doc-introduction" aria-labelledby="id_introduction">
<section epub:type="prologue" role="doc-prologue" aria-labelledby="id_prologue">
<section epub:type="chapter" role="doc-chapter" aria-labelledby="id_chapter_1">
<section epub:type="conclusion" role="doc-conclusion" aria-labelledby="id_conclusion">
<section epub:type="epilogue" role="doc-epilogue" aria-labelledby="epilogue_ID">
<section epub:type="glossary" role="doc-glossary" aria-labelledby="id_glossary">
<section epub:type="acknowledgements" role="doc-acknowledgments" aria-labelledby="id_acknowledgements">
<section epub:type="afterword" role="doc-afterword" aria-labelledby="id_afterword">
<section epub:type="appendix" role="doc-appendix" aria-labelledby="id_appendix">
<section epub:type="bibliography" role="doc-bibliography" aria-labelledby="id_resources">
<section epub:type="index" role="doc-index" aria-labelledby="id_index">
<section epub:type="contributors" aria-label="About the Author" class="author">
<section epub:type="endnotes" role="doc-endnotes" aria-labelledby="id_endnotes">
Remember the accompanying h1
needs an id.
Covers
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" lang="en-US" xml:lang="en-US">
<head>
<title>Cover of BOOK_TITLE</title>
<link href="css/styles.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<section aria-label="cover">
<figure class="cover-img">
<img class="cover-image" role="doc-cover" epub:type="cover" src="COVER_FILE_PATH" alt="ALT_TEXT_HERE"/>
</figure>
</section>
</body>
</html>
digitalrights.xhtml
See also css.digital rights
Remember to update css
/* digitalrights.xhtml */
section.digitalrights{
display: block;
margin: 15% auto;
max-width: 80%;
}
section.digitalrights p{
text-indent:0;
margin-bottom:.6em;
}
.upper{
text-transform:uppercase;
}
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" lang="en-US" xml:lang="en-US">
<head>
<title>Statement of Digital Rights</title>
<link href="css/styles.css" rel="stylesheet" type="text/css"/>
</head>
<body epub:type="frontmatter">
<section class="digitalrights" aria-label="Digital Rights">
<p><span class="upper">Orca Book Publishers</span> is proud of the excellent work our authors and illustrators do and of the important stories they create. If you are reading this book and did not purchase it or did not check it out from a library provider, then the contributors have not received royalties for this book. Unless purchased as part of a multi-user subscription, the ebook you are reading is licensed for single use only and may not be copied, printed, resold or given away.</p>
<p>Orca is busy making accessible editions of our books. Please visit <a href="https://orcabook.com">orcabook.com</a> to find out which books have these added features. If you are interested in using this book in a classroom setting, we have a reading app with with multi-user, simultaneous access to our books. For more information, please contact <a href="mailto:digital@orcabook.com">digital@orcabook.com</a></p>
<p>You can also purchase our books at various online vendors or brick-and-mortar bookstores, ensuring the creative minds that made the books get paid for their efforts.</p>
</section>
</body>
</html>
Glossary
Run script: /Projects/ Ebook Production/scripts/epub/epub scripts for glossary/makeglossarylinks.py
NOTES remove links from within <li>
in glossary.xhtml e.g <a id="_idTextAnchor616"/>
You might have to cut them out entirely temporarily
SUB NOTE the script is broken again. Also needs fixes for caps and non-breaking spaces
<a class="glossary-term" href="glossary.xhtml#glossary_term" id="glossary_term">glossary_term</a>
<p class="glossary" id="glossary_term"><b>glossary_term</b>—lorem ipsum et cetera e pluribus unum.<a epub:type="backlink" href="chapter-XX.xhtml#glossary_term">↩</a></p>
Accessibility Page
Ensure spine has:
<itemref idref="accessiblecontent.xhtml" linear="no"/>
NOTE it's good practice to repeat the original illustration.
Long/Extended descriptions
https://www.accessiblepublishing.ca/a-guide-to-image-description/
https://apln.ca/how-to-add-extended-descriptions-in-epubs/
- Create an
accessiblecontent.xhtml
file, add to the book’s manifest and spine. Start with a level-one heading for Accessible Content. - Anchor the appropriate section, design a text table, and link back to the figure in the main narrative.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
<title>Extended Descriptions</title>
<link href="css/styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<section aria-labelledby="access_id">
<h1 id="access_id">Extended Descriptions</h1>
<section aria-labelledby="id_SECTION-X-X" id="access-X-X">
<h2 class="access" id="id_SECTION-X-X">TABLE_TITLE</h2>
<table class="access">
<thead>
<tr>
<th>Year</th>
<th>Thousands of People</th>
</tr>
</thead>
<tbody>
<tr>
<td>1850</td>
<td>750</td>
</tr>
<tr>
<td>1860</td>
<td>900</td>
</tr>
</tbody>
</table>
<p class="access-link sb"><a href="ORIGINAL_FILE.xhtml#figure-X-X">Return to Figure X-X</a></p>
</section>
</section>
</body>
</html>
External Links to Accessible Tables
Place a link to the accessible table between the image tag and the figure caption.
<figure id="figure-X-X">
<img class="float" src="image/Fig_2.1_Denning_mc.jpg" alt="Graph showing the increasing trend of the American population." />
<p class="access-link"><a href="accessiblecontent.xhtml#access-X-X">Accessible Version of Figure X-X</a></p>
<figcaption>Figure 2.1. American population of lower Great Lakes watershed, 1840-1920.</figcaption>
</figure>
CSS
/* ACCESSIBILITY */
h2.access{
margin-top:1em;
}
p.access-link {
font-family: sans-serif;
font-size:0.8rem;
font-style:normal;
line-height:1.2em;
margin-top:.5em;
text-align:left;
text-indent:0em !important;
}
table.access th{
font-family: sans-serif;
font-size:.8em;
text-align: left;
vertical-align: top;
padding-bottom:.5em;
font-weight:bold;
width: 25%;
}
td{
border-left: 1px dotted;
font-size:.8em;
line-height:1em;
padding:.25em .5em;
text-align: center;
vertical-align: top;
}
table.visible th{
font-family: sans-serif;
font-size:.8em;
vertical-align: top;
padding-bottom:.5em;
font-weight:bold;
}
table.visible th.left{
text-align: left;
}
table.visible th.right{
text-align: right;
}
table.visible td{
font-size:.8em;
text-align: center;
vertical-align: top;
padding-bottom:.5em;
}
For more guidance on providing Long Descriptions in ePubs, see the W3C’s Providing a Long Description in another location with a link to it that is immediately adjacent to the non-text content
Extended descriptions
- for alt description over 200 characters use a hidden aside
NOTE: There is some doubt as to whether this should be hidden="hidden
or class="hidden"
with css that hides the text. It maybe that`'hidden="hidden
also hides it from AT (assistive technology)
<img src="../images/IMAGE_NAME.jpg" alt="Black and white illustration: Jasmine and her family in a jeep." aria-describedby="desc01"/>
<aside id="desc01" hidden="hidden">
<p>Father is driving. Mother is sitting in the front near the father. Jasmin, her brother, and her baby sister Tara are sitting behind the parents. Tara is placed in a car seat in the middle of Jasmin and her brother. A dog is seated in the very back of the jeep. The available spaces are filled with grocery bags.</p>
</aside>
Details and Summary
A toggle/dropdown can also be used. Support is unclear but it doesn't work with Kindle Previewer.
<details>
<summary>Details</summary>
Details and other info about the above image.
</details>
Between <body>
tags
Proper Chapter Titles
fiction
<h1 id="Ch_ID" epub:type="title"><span epub:type="pagebreak" role="doc-pagebreak" id="page1" aria-label="page 1"></span>Chapter One</h1>
non-fiction
<h1 class="ch_3 chapter-num" id="Ch_ID" epub:type="title">Three<br/>
<span class="chapter-title">Water and Waste</span></h1>
Page breaks / pagelist
<span epub:type="pagebreak" role="doc-pagebreak" id="page42" aria-label="page 42"></span>
Asides, Sidebars and ARIA
If sidebar has no Title
<aside aria-label="Sidebar 1" class="aside-red">
If the sidebar has a Title
<aside aria-labelledby="title-XX" class="aside-red">
<h2 class="sidebar-head" id="title-XX">This is the title</h2>
<p class="sidebar">CONTENT</p>
</aside>
- If not
<aside>
the userole="complementary"
Special characters
- nonbreaking space:
 
- nonbreaking character
 
- thin space:
 
XML:lang
tags
Subtags: The list: https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
Another list (the official Onix one): https://ns.editeur.org/onix/en/74
All about tags: https://www.w3.org/International/articles/language-tags/
Language Tags can have several components:
Major languages are represented by a two or three letter code (primary language subtag) e.g. English: en
; French: fr
; Cree: cr
; Albanian: sq
; Latin: la
(yes, some latin should be tagged) etc.
There can also be an extended subtag region attached e.g. Canadian French: fr-CA
vs Luxembourg French: fr-LU
Some region tags:https://www.andiamo.co.uk/resources/iso-language-codes/
Alternatively there can be an extended subtag for scripts e.g. Serbian in Cyrillic script: sr-Cyrl
vs Serbian in Latin script: sr-Latn
(Note: you would normally not use the Latn subtag in a book that was mainly in latin script)
Made up languages
Can be tagged: Klingon: tlh
; Esperanto: eo
; if it is a one-off made up langage it is preceded by an x: x-arcturan
Non-linguistic
Use the subtag zxx when the text is known to be not in any language.
xml:lang="zxx"
<p>Here is a list of part numbers: <span xml:lang="zxx">9RUI34 8XOS12 3TYY85</span>.</p>
Undetermined:
xml:lang="und"
However you should only tag text as undetermined if you can't just leave it as is. In practice, this means you should only use this markup if the undetermined text is embedded in content that has already been labeled for language in some way. e.g.
Subtags
Lookup Tool
- https://r12a.github.io/app-subtags/
Examples of language tags including extlang subtags are:
zh-yue
(Cantonese Chinese)
ar-afb
(Gulf Arabic)
<i xml:lang="fr">Mon frére est tout <span xml:lang="und">kazplumed</span>.</i>
Indigenous languages
A listing of some North American indigenous languages. Be sure to use Tool below to check if there are any sub languages e.g. sal
(salishan) has both slh
(southern puget sound salish) and str
(straits salish)
Spellings
- you can represent Kwaka̱ka̱wakw as
Kwaka̱ka̱wakw
West Coast Languages
Chinook jargon (Chinuk Wawa): chn
Haida: hai
Hul’q’umi’num’: hur
Kutenai (Kootenai): kut
Salishan languages (Salish): sal
southern Puget Sound Salish:slh
straits Salish: str
Tlingit: tli
Tsimshian: tsi
Wakashan languages: wak
Other North American languages
Athapascan languages: ath
Blackfoot/Siksika: bla
Chipewyan: chp
Cree: cr
Dakota (Sioux): dak
Delaware (Munsee): del
Dogrib (Tli Cho): dgr
Inuktitut: iu
Inupiaq: ik
Micmac; Mi'kmaq: mic
Mohawk: moh
Ojibwa: oj
Slave (Athapascan): den
Gwichya Gwich’in: gwi
Eastern Shoshone: shh
Paiute: pao
Nēhiyawēwin: crk
Michif: crg
Lakota: lkt
— source https://www.nationsonline.org/oneworld/language_code.htm