0 valutazioniIl 0% ha trovato utile questo documento (0 voti)
120 visualizzazioni5 pagine
A class selector gives you the ability to set up an independent style that you can then apply to any HTML tag. The ID selector can be used to create unique styles that are independent of any particular HTML tag, Thus they can be assigned to any tag. Defining selectors to have the same styles is as simple as putting selectors in a list separated by commas.
A class selector gives you the ability to set up an independent style that you can then apply to any HTML tag. The ID selector can be used to create unique styles that are independent of any particular HTML tag, Thus they can be assigned to any tag. Defining selectors to have the same styles is as simple as putting selectors in a list separated by commas.
Copyright:
Attribution Non-Commercial (BY-NC)
Formati disponibili
Scarica in formato PDF, TXT o leggi online su Scribd
A class selector gives you the ability to set up an independent style that you can then apply to any HTML tag. The ID selector can be used to create unique styles that are independent of any particular HTML tag, Thus they can be assigned to any tag. Defining selectors to have the same styles is as simple as putting selectors in a list separated by commas.
Copyright:
Attribution Non-Commercial (BY-NC)
Formati disponibili
Scarica in formato PDF, TXT o leggi online su Scribd
Using a class selector gives you the ability to set up an independent style that you can then apply to any HTML tag. Unlike an HTML selector, which automatically targets a specific tag, a class is given a unique name that is then specified using the style attribute in the HTML tag or tags you want to use it in. Class Selector Property Value
.instructor { font-size : 1em }
Declaration
The general syntax of a CSS rule using a class selector
The general syntax of a dependent class selector rule
Defining ID Selectors to Identify an Object
Like the class selector, the ID selector can be used to create unique styles that are independent of any particular HTML tag. Thus they can be assigned to any HTML tag. IDs are used in HTML layout to help establish the structure of your page, identifying unique elements in the code. IDs are also cornerstone of dynamic HTML (DHTML) in that they allow JavaScript functions to identify a unique object on the screen. This means that unlike a class, an ID can be used only once on a page to define element as an object. This object then can be manipulated using JavaScript.
The general syntax for an ID selector
The general syntax for the dependent ID selector rule.
Defining Selectors To Have The Same Styles
If you want two or more selectors to have the same declarations, just put the selectors in a list separated by commas. The general syntax for a selector grouping is shown below.
Learn Python Programming for Beginners: Best Step-by-Step Guide for Coding with Python, Great for Kids and Adults. Includes Practical Exercises on Data Analysis, Machine Learning and More.
Microsoft 365 Guide to Success: 10 Books in 1 | Kick-start Your Career Learning the Key Information to Master Your Microsoft Office Files to Optimize Your Tasks & Surprise Your Colleagues | Access, Excel, OneDrive, Outlook, PowerPoint, Word, Teams, etc.
Microsoft Excel Guide for Success: Transform Your Work with Microsoft Excel, Unleash Formulas, Functions, and Charts to Optimize Tasks and Surpass Expectations [II EDITION]
Microsoft PowerPoint Guide for Success: Learn in a Guided Way to Create, Edit & Format Your Presentations Documents to Visual Explain Your Projects & Surprise Your Bosses And Colleagues | Big Four Consulting Firms Method