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

Commenting a CSS style sheet

From: Creating a CSS Style Guide: Hands-On Training

Video: Commenting a CSS style sheet

By adding the footer, we have really made that style page rock visually but there are things we can do behind the scene. Remember it's front end and back end design. Commenting is one of those ways. Typically when you go out for a job interview in industry, there is a first interview where you show your visual portfolio but there is what we call a callback or a second interview. In that second interview, the employer will ask to look at your file structure, to see your file folders, to actually see your code, to see your CSS style sheets, to see your notes on how you started the project, even those text documents that I showed earlier in this project.

Commenting a CSS style sheet

By adding the footer, we have really made that style page rock visually but there are things we can do behind the scene. Remember it's front end and back end design. Commenting is one of those ways. Typically when you go out for a job interview in industry, there is a first interview where you show your visual portfolio but there is what we call a callback or a second interview. In that second interview, the employer will ask to look at your file structure, to see your file folders, to actually see your code, to see your CSS style sheets, to see your notes on how you started the project, even those text documents that I showed earlier in this project.

One of the ways you can show them that you really are in the know is to comment your code and I always comment style sheets. Let's click on our Code View then select our style guide. I do this as much for my team and for my clients as for myself. Often when you are working with a client, three months later they will call you back and say, "I would like you do some maintenance work" and this is a great way for designer to make some money and to have a long term relationship with their clients but it has been three months and there has been three projects between then and now. By adding comments, I can see exactly what I have done and I can go and help my client get their site updated the way they want.

A typical request by a client might be "It's wintertime. Let's change the background color to reflect what's going on in winter." "I want to change an image here or do this." Now this is a small, small site, but still comments will help. The second big, big reason for me is I can share my code, share my ideas and do this throughout the design process so that my team knows what I'm doing, why we are doing it, what changes need to be made. So comments are a good thing. At the top of your style sheet, insert your I-beam right after the utf-8 phrase and then hit the Return or Enter key. To create a comment, simply do /* and don't get worried if everything turns gray, then do another */.

It will all come back on. As long as your comments are wrapped in this /* */, it won't show anywhere. It's just for you only. It's a visual only, read-only thing for the designer or developer. Insert your I-beam between the two asterisks. The first thing we want to remind ourselves is that we used CSS shorthand throughout. So let's type that, CSS Shorthand used throughout. Try to keep it short, simple and direct. So when I come back to this project three months, six months from now, I'll know exactly what's going on here.

I also spend a lot of time ordering my tags in order that I could find them again and that's good to comment about as well. I'm going to select this line, so I don't need to type that again, copy it, insert my I-beam at the end of this line, this comment, hit the Return key, paste, delete everything between the asterisks and right here I'm going to write HTML Tag Styles. I will copy this little comment again and go to my next section of styles which are my classes and I can tell when I at the classes because classes have a period before the name of the class. I'll insert my I-beam after the last style but before the classes, paste, delete everything between the asterisks and here I'll type 'Class styles' and because I'm a beginner, I'm just going to write another note to myself, '- can be applied many times per page.' I can use it as often as I want. Select this line, copy it, move on down your page, I have all my ids together and I can recognize that they are ids because they are proceeded by the hash mark. Insert my I-beam after the last style, hit the Return key, paste, select everything between the two asterisks, delete that and what we want to type here is 'DIV ID Styles' and 'can be applied only once per page.' That looks good.

And finally one other thing. I need to make a little note to myself about the anchor tags. I don't know if I can remember all these things about the anchor tags and this is a big problem. Anchor tags have to be consistent throughout large sites so lots of people comment. We will make an easy one for a beginner but something to remind us about how to use our anchor tags. So I'm going to click on the last tag, hit my Return or Enter key, paste, select everything between the two asterisks, delete and I'm going to write 'a or anchor tags -t he four states that must appear in the following order' and that order should be L, V, H, and A. And let's just put our little mnemonic device in here. LoVeHAte. I even have my little prompt to remind me to keep this order the same way for all my anchor tags.

This kind of commenting, markup, project management and attention to detail will help you with your portfolio development and eventually support your efforts in the job market. Now one other thing I want to tell you, comments do not change the way your page displays. It's simply for you. That's why it's grayed out. It isn't code that will be applied in any way by the browser. So whenever you see other people's style sheets and you see this gray commenting, be sure you read it. It's for you to read or to remind you. People put their dates in there, they put all kinds of information, even what they were thinking about and why they were styling it the way they were.

I really enjoy going out using my Web Developers toolbar and looking at the kinds of comments that other designers and developers are using. Let's go back to Design View and in fact, those comments have not in any way changed the way the design view looks. Comments- use them. You will set yourself apart, you will look like you know how to communicate both visually, orally, and in writing.

Show transcript

This video is part of

Image for Creating a CSS Style Guide: Hands-On Training
Creating a CSS Style Guide: Hands-On Training

35 video lessons · 28023 viewers

Laurie Burruss
Author

 
Expand all | Collapse all
  1. 6m 58s
    1. Welcome
      1m 9s
    2. Objective of this course
      3m 38s
    3. Using the exercise files
      2m 11s
  2. 28m 26s
    1. Starting Dreamweaver for the first time
      3m 38s
    2. Defining a website
      4m 3s
    3. Understanding the Dreamweaver interface
      9m 43s
    4. Setting up a custom workspace
      4m 10s
    5. Setting essential preferences
      6m 52s
  3. 56m 54s
    1. Laying out a page in a text document
      3m 40s
    2. Creating and saving a new document
      3m 27s
    3. Inserting an image
      8m 22s
    4. Marking up text using the Property Inspector
      6m 48s
    5. Marking up text by hand
      9m 21s
    6. Inserting, formatting, and selecting a table
      8m 16s
    7. Creating links
      12m 26s
    8. Styling a footer
      4m 34s
  4. 22m 15s
    1. Using Modify Page Properties to create embedded styles
      12m 22s
    2. Creating links with CSS
      4m 55s
    3. Working with Code, Split, and Design views
      4m 58s
  5. 8m 52s
    1. Defining browsers to test a web page
      2m 24s
    2. Previewing a web page in a browser
      6m 28s
  6. 16m 44s
    1. Using a span tag to add a class and customize appearance
      10m 34s
    2. Using the Tag Inspector to create and edit additional styles
      6m 10s
  7. 48m 42s
    1. Exporting existing styles into an external style sheet
      7m 0s
    2. Using the CSS Styles panel to add a new style
      5m 43s
    3. Using the div tag to create a content container
      11m 8s
    4. Overriding the default browser styles
      2m 46s
    5. Applying padding and margins
      4m 57s
    6. Styling header tags
      5m 34s
    7. Creating and styling compound tags
      5m 12s
    8. Editing preexisting rules
      6m 22s
  8. 19m 36s
    1. Improving the Footer
      5m 12s
    2. Commenting a CSS style sheet
      7m 0s
    3. Creating a custom color palette
      7m 24s
  9. 3m 6s
    1. Style sheet final review
      3m 6s

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.

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 Creating a CSS Style Guide: Hands-On Training.

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.