IT2805 Web technologies
  • Introduction
  • Web architecture
  • The Internet
  • Developing for the web
  • Document Object Model
  • HTML
    • Document Structure
    • Attributes
    • Text
    • Lists
    • Links
    • Images
    • Tables
    • Comments
    • Semantic elements
  • Site structure
  • CSS intro
    • Understanding CSS
    • Syntax
    • Comments
    • Cascade
    • Inheritance
    • Selectors
    • Color
    • Margin and padding
    • Center elements
    • Borders
    • Text and fonts
    • Pseudo-classes
  • CSS continued
    • Styling lists
    • Change between inline and block elements
    • Hide boxes
    • Document flow
    • Inheritance
    • More pseudo-classes
    • Overflow
  • Web and multimedia
    • Images
    • Video
    • Audio
  • Forms and validation
    • The form element
    • Form structure
    • Form validation
    • How to design a form
  • Responsive web design
    • Media types
    • Media features
    • Logical operators
  • Introduction to JavaScript
    • How and where to write JavaScript
    • Comments
    • Data types
    • Logical operators
    • Variables and constants
    • When something doesn't exist
    • Control structures
    • Arrays
    • Objects
    • Loops
    • Functions
    • JSON
  • Dynamic websites
  • JavaScript continued
    • Arrays
    • Scope
    • Time
    • Document Object Model
    • Events
  • XML
  • Canvas
Powered by GitBook
On this page

Was this helpful?

  1. CSS intro

Comments

As with HTML, you can make comments so that the content between the opening and closing tag is not considered when the code is executed. This can be used to comment out the code, or give explanations. In CSS, comments are written as such: /* Some comment */.

If you want to exclude some CSS rules without deleting it, you would enclose it with the comment tags, e.g.:

/*
.some-class{
    color: #1d1d1d;
}
*/
PreviousSyntaxNextCascade

Last updated 4 years ago

Was this helpful?