Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Design > Adobe Creative Suite

Like this article? We recommend Time for an Example!

Time for an Example!

Now that you have a few best practices in mind, it's time to start saving Illustrator artwork for the Web. In this example, you'll see how to create and save a button in the correct file format to be used on your web page. We'll skim through the artwork creation (shapes, text), focusing on the best practices and optimizing the artwork.

Step 1: Create a New Document

Choose File > New to create a new document for your web content. In the New Document dialog box, choose Web from the New Document Profile menu (see Figure 4). This choice sets the units to pixels, changes the color mode to RGB so that all the colors you create are RGB, and gives you standard web page sizes in the Size menu.

Figure 4 Creating a new file in Illustrator.

You should make the artboard(s) the correct size for the artwork. If you're going to design a standard web page, the artboard dimensions should be approximately 970 pixels in width by 600 pixels in height (the standard size of a page these days). If you're going to create a button or a logo, you want to match the artboard to the final optimized size (the size that the graphic needs to be on the web page).

Since Illustrator allows you to create multiple artboards, you may have many "pieces" for your web design in a single document—buttons, logos, and much more. Illustrator will crop each artboard to be a single image when the artwork is optimized (saved for use on the Web). If you create an entire web page design, you most likely will need to divide the artboard into smaller pieces by using the Slice tools.

As mentioned earlier, clicking the arrow to the left of the Advanced option allows you to select Align New Objects to Pixel Grid. This can be a great idea for aligning content such as shapes and other artwork to the pixel grid for better precision.

Step 2: Create the Artwork

Creating the artwork is obviously the bulk of the task, which I'll leave to you, but I want to point out some useful ideas to help as you go along. Figure 5 shows some simple artwork I've created, which I'll use as an example in the remainder of this article.

Figure 5 Example of artwork for the Web.

  • Since all of your beautiful vector artwork is rasterized when you save the content for the Web, it's helpful to preview how the rasterized content will look. Choosing View > Pixel Preview and zooming in will show you the pixel grid to which your new content will be aligned by default, assuming that you chose Align New Objects to Pixel Grid in the New Document dialog box.
  • If you don't want certain artwork to align to the pixel grid, or you copy-and-paste content into the document, you can change the setting for Align to Pixel Grid at the bottom of the Transform panel.
  • To align text to the grid, choose Type > Create Outlines, and then select Align to Pixel Grid in the Transform panel.
  • Make sure that artwork and artboards you create are in whole pixels, not fractions (60 pixels wide, not 60.021). The setting makes a difference in how the artwork is trimmed.
  • Be very careful with gradients. If your artwork uses a gradient that covers a vast area or is really short, and colors in the gradient are at opposite ends of the spectrum (such as black and white), you may hit banding issues. When you save content for the Web, it's easy to optimize gradients so much that they appear to be banded—GIFs are especially troublesome. Try to confine your gradients to a smaller area—the top 100 pixels or so, for instance—rather than the entire page background, and make sure that the colors aren't complete spectrum opposites. If that's the situation and it can't be helped, you may end up with an image that has a decent-looking gradient when the file is saved for the Web (with the correct file type), but a larger file size.
  • Select Object > Slice > Clip to Artboard. This option should be selected by default, but it pays to make sure. With this option selected, each artboard is saved as a separate graphic when you choose File > Save For Web & Devices.
  • Use symbols when you can. If you're creating web designs, you most likely will reuse things such as button bases again and again. Most of the time, the best way to ensure consistency and make your life easier later is to determine which artwork you're going to use multiple times, and save it as a symbol.
  • Create layered artwork. Whether in print or on the Web, organized files are easier for other people (or for you) to work with later.

Step 3: Optimize the Artwork

Once the artwork is created, you need to optimize it. If your document contains multiple artboards, make sure that the correct artboard is selected before optimizing.

  1. Choose File > Save For Web & Devices. In the Save For Web & Devices dialog box, click the 2-Up tab in the upper-left corner. This step allows you to see the original artwork onscreen with the final optimized form, so you can compare them (see Figure 6).
  2. Figure 6 The Save For Web & Devices dialog box.

  3. In the split view, make sure that the optimized side is selected. Then choose the correct file type from the Preset menu: GIF, JPG, or PNG. Which of the presets you choose (GIF 128 Dithered versus GIF 128 No Dither, for instance) doesn't matter at this point.
  4. When the correct file format is selected, you need to select the optimal settings for your specific artwork (see Figure 7):
    • If you choose GIF, you need to choose the correct number of colors and specify whether you want the image to have transparency.
    • If you choose JPEG, you need to adjust the Quality setting. The lower the quality of the image, the greater the compression.
    • If you choose PNG, you need to choose between PNG-8 and PNG-24. PNG-8 is similar to GIF, with simple transparency. A PNG-24 image allows for alpha transparency and more color.

    Figure 7 GIF compression settings.

  5. After choosing the correct file type and settings, you can also adjust the image size by clicking the Image Size tab on the right side of the dialog box (see Figure 8). This is a great way to create multiple versions (sizes) of the same graphic, or to resize the optimized image without affecting the original.
  6. Figure 8 Extra options when compressing for the Web.

  7. Preview the image by clicking the Preview in Default Browser button at the bottom of the dialog box. This action opens the image in a browser and displays a preview.
  8. Click Save when you're ready to save the image.
  9. After you click Save, the Save Optimized As dialog box appears. From the Format menu, choose what you want Illustrator to save for you: only the image, the image and an HTML page, or just an HTML page. For this example, I would choose Images Only (see Figure 9).
  10. Allowing Illustrator to create an HTML page is useful if you've designed the entire layout in Illustrator on a single artboard and used the Slice tools to dissect the layout into areas.

    Figure 9 Final steps in saving the image for the Web.

  11. From the Settings menu, choose Other. In the resulting Output Settings dialog box are a lot of settings for generating HTML code, and very few settings for saving a single image with no slicing (see Figure 10). One of the more interesting options in this dialog box is to choose Saving Files from the second menu from the top, and then deselect (or keep selected) Put Images in Folder: images near the bottom of the dialog box. Deselecting this option prevents Illustrator from saving your image file into an images folder that it creates.
  12. Click OK, and then click Save in the Save Optimized As dialog box.
  13. Figure 10 Pay attention to these extra options when saving for the Web.

Peachpit Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Peachpit and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Peachpit products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email ask@peachpit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by Adobe Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.peachpit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020