Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Mapping styles to export tags

From: InDesign CS5.5 New Features

Video: Mapping styles to export tags

When designing a layout most people usually name their styles, if they use styles at all, something like headline, subhead, sub subhead, and body, but with HTML the names of styles are much more strict. In Web design styles are normally named h1 for the biggest and most important headline on the page, h2 for the next largest headline, and you repeat this process all the way down to h6. p is reserved for the normal body text or normal paragraph text. Using the new style mapping feature you can continue to use whatever name inside InDesign that you wish, but upon export, the style names will change to whatever export you had set them to.

Mapping styles to export tags

When designing a layout most people usually name their styles, if they use styles at all, something like headline, subhead, sub subhead, and body, but with HTML the names of styles are much more strict. In Web design styles are normally named h1 for the biggest and most important headline on the page, h2 for the next largest headline, and you repeat this process all the way down to h6. p is reserved for the normal body text or normal paragraph text. Using the new style mapping feature you can continue to use whatever name inside InDesign that you wish, but upon export, the style names will change to whatever export you had set them to.

So inside the mapping-styles InDesign document, I'm going to come up and I'm going to select this text at the top. Now this text is tagged with a paragraph style called Title, and this is the biggest and most important headline inside this page. In export to HTML I would want this to be an h1. So in order to map this to h1, I'm going to select this style and I'm going to right-click and choose Edit "Title". Now I could double-click if I want to edit the style and it would work in this instance, but I don't recommend you do that. The reason is it's not always safe. For example, if my cursor was in this body text and I decided that I wanted to edit title, and I came over and I double- clicked on Title, I would inadvertently apply a title to that paragraph which would cause a big problem.

So I really don't like double-clicking our styles. I'm going to cancel this dialog and do an undo to go back. So with my cursor in this main story, I'll right-click and choose Edit "Title". And inside the Paragraph Style Options, I'm going to come down to Export Tagging. Inside Export Tagging I've got two areas; I've got my EPUB and HTML area and my PDF area. So, because title is the biggest and most important headline on a page, I want that to be my h1, and for PDF it's going to be the same thing.

Now you may be thinking to yourself so, why is this split apart when they're both h1? Well looking at it, it's true they are both h1, but inside a PDF, H1 is capitalized, but in the EPUB and HTML it's a lowercase; that's one reason. The other reason that these are split apart is that in the future something may change with the PDF or HTML tags. In this case because they're separated, they can be enhanced in future versions without breaking anything. So I'm set with this with this one as h1, so I'll click OK. Now let's come to another area. Now inside this paragraph it says that it's body.

Now I'm going to right-click on this one and go to Edit " body" and we'll set this one inside our Export Tagging. We'll have this be p for paragraph and for PDF we'll go to paragraph 2. But when I go to this one right here it's called body first. Well, when I Edit "body first" there's another option. I do want to tag this one as a paragraph, for both of these, but I have an option for a Class. Now a class is used in HTML as a common way to differentiate slight variations of styling. So in this case I want to put a class and I'm just going to call this body-first.

This way if you're editing the CSS, you can call up this particular paragraph and treat it differently; that's what classes are for. In addition to choosing the tags that are in here, you could actually type in your own, if you knew a specific tag that you want to tag it to, but for now I'm going to stick it with the defaults. You can also tag your character styles. So inside my layout if I zoom in here, we're going to see there's an area that's bold. If I put my cursor inside this bold area, we can see that we've got a style called bold. If I edit this character style, under my Export Tagging, I only have an option for EPUB and HTML because there is no such thing as Character Styles inside a PDF.

I'm going to choose the Tag strong because strong is the HTML equivalent of bold. I could also add a Class if I needed to. I'm going to click OK. Now I could go through one by one and manually make all these paragraph and character style changes, but that would be a lot of work if I have a lot of styles. So there's a faster way to do this. If I go to my Paragraph Style panel menu, there's an option called Edit All Export Tags. When I do this, I'll get a big dialog and I can open this up to see more, and I can change all of them at once.

So I can see caption right here; caption would be a paragraph, same thing with photo credit, footnotes, but a subhead, that would be h2. My sub subhead would be an h3. My Sidebar subhead; and I can open this up a little more so I can see everything, there we go. Sidebar main head, well, that's going to be an h2. The bullets we're going to leave alone; anything that's a bullet will automatically transfer to a list when you export so I don't have to change that. But my main copy can be a paragraph, table head can be an h2, tables will be bold.

Now for my character styles, italic would be an m for emphasis, and then no break and bullet and drop cap I'll just leave alone, but I could add a span if I wanted to. If I go over to PDF I can repeat the options here so we're just going to come in here and we'll say paragraph for these guys, subhead would be an H2, sub subhead is an H3, Sidebar main head is an H2, and so on, and so on. Okay, with all of these set we can click OK and now we're ready to export to HTML.

I'm going to go to File > Export. I'll throw this on my Desktop and we're going to call this style-mapping. Now in Export I want to make sure this is the same as the Article panel for the ordering. We'll View it after Exporting. We're going to go into Advanced and we're going to choose No CSS because I just want to have this as clean and simple code as possible. We'll click OK. We'll be exploring these options in further detail in a later movie. Now inside my Web browser I can see my copy where it's formatted with the basic HTML tagged up text, and it looks nice and clean.

This will make it easier to make changes with the CSS. Let's take a look at this inside Dreamweaver. I'm going to go over to Dreamweaver and we'll open up this file on our desktop, the style-mapping. And inside my layout, if I select my text, we can see that A Brief History of San Francisco is tagged with an h1 and in our copy over here and we can see it's tagged with paragraph style. If we come to a spot where there's emphasis involved, such as this word, we can see that we have the emphasis tags directing on there, or for the print people the Italic button has been pressed.

Style mapping makes it much easier to repurpose your print layout for other formats like HTML or EPUB. In most workflows a web designer will want to hand code the CSS for a site. By giving them a clean HTML file with marked-up copy, that is proper h1 through h6 and paragraph tags, it'll be easier than ever to share your content.

Show transcript

This video is part of

Image for InDesign CS5.5 New Features
InDesign CS5.5 New Features

15 video lessons · 11766 viewers

James Fritz
Author

 

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now "Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed InDesign CS5.5 New Features.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.