CSS Ids and Classes Flashcards
17 Questions
100 Views

CSS Ids and Classes Flashcards

Created by
@SalutaryPentagon

Questions and Answers

What are nested selectors?

You would list the selector including the selectors it's nested within.

How are parents, children, and siblings represented in HTML?

HTML page is like a tree where the HTML tag is the trunk (parent) and its child tags are levels below, siblings share the same level.

What does the universal selector (*) do in CSS?

It allows us to format all elements on a page.

What are classes in CSS?

<p>Classes allow you to apply the same types of format to multiple elements using the 'class' attribute.</p> Signup and view all the answers

How do IDs differ from classes in CSS?

<p>IDs apply styles to a single element type and are identified with a '#'.</p> Signup and view all the answers

What is a URL?

<p>A web page's unique address.</p> Signup and view all the answers

What does the scheme 'https' indicate?

<p>It tells which protocol to use when accessing the website.</p> Signup and view all the answers

What is a subdomain?

<p>It tells which particular page of your website the browser should load.</p> Signup and view all the answers

What is the function of a 2nd Level domain?

<p>It is the name of the website itself.</p> Signup and view all the answers

What is a top-level domain?

<p>.com</p> Signup and view all the answers

What is a sub-directory in a URL?

<p>It indicates what particular part of the webpage you are on.</p> Signup and view all the answers

What are servers?

<p>Special networked computers that serve data to other computers.</p> Signup and view all the answers

What is an Internet Service Provider (ISP)?

<p>A company that provides access to the internet and other related services.</p> Signup and view all the answers

What are browsers?

<p>Software applications used to access the web.</p> Signup and view all the answers

What are search engines?

<p>Internet programs that search for documents with specified keywords.</p> Signup and view all the answers

What is 'the cascade' in CSS?

<p>A set of rules that defines which CSS rule wins in case of a conflict.</p> Signup and view all the answers

What does the '!important' modifier do?

<p>It makes a CSS rule override other conflicting rules.</p> Signup and view all the answers

Study Notes

CSS Selectors and Structure

  • Nested Selectors: Format involving multiple layers of selectors. Example: div p { font-family: Garamond; }
  • Hierarchy in HTML: Visualize HTML as a tree. Tags like <html> are parents, while <head> and <body> are children. Tags within these (e.g., <title>, <p>) are siblings and children at different levels.

CSS Basics

  • Universal Selector: The asterisk (*) formats all elements uniformly. Example: * { color: #3A5FCD; }
  • Classes: Denoted by a period (.) followed by the class name. Classes allow for consistent formatting across multiple elements. Example: .purple { color: purple; }
  • IDs: Identified by a hash (#) followed by the id name. Used for styling a single element distinctly. Example: #red { color: red; } IDs override both tag and class styles.

URL Components

  • Uniform Resource Locator (URL): A unique address for web pages. Example: https://blog.hubspot.com/marketing
  • Protocol (Scheme): Indicates the access method for the website; for example, using HTTPS for secure connections.
  • Subdomain: The initial part of a URL that specifies a particular segment of the site; for example, "blog" in the URL.
  • Second Level Domain: The main name of the website, such as "hubspot" within the URL.
  • Top-Level Domain (TLD): Indicates the nature of the entity that registered the site, such as .com, .org, etc.
  • Subdirectory (Path): Represents a specific section of the website, like "marketing" in the URL.

Networking and Accessibility

  • Servers: Networked computers providing requested data to users. Each server has a distinct address on the internet.
  • Internet Service Providers (ISP): Companies that grant access to the internet, facilitating online connectivity for users.
  • Browsers: Software applications (e.g., Chrome, Firefox, Safari) used by individuals to navigate the web.
  • Search Engines: Tools (e.g., Google, Bing) that locate documents based on user-specified keywords.

CSS Conflict Resolution

  • The Cascade: A system determining which CSS rules apply when conflicts arise based on importance, specificity, and rule order.
  • Important Modifier: A special rule that can override others when used with CSS declarations, activating with !important.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Description

This quiz provides flashcards to help you understand important concepts in CSS such as nested selectors and the relationships between parent, child, and sibling elements. Perfect for anyone looking to strengthen their web design skills.

More Quizzes Like This

Nested Control Structures Quiz
6 questions
Nested Subprograms and Blocks Quiz
34 questions
Java Nested Classes Overview
9 questions
Use Quizgecko on...
Browser
Browser