Question

Which of the following selectors matches an h1 heading with the id “topHeading”? h1#topHeading h1[id=“topHeading”] h1...

Which of the following selectors matches an h1 heading with the id “topHeading”?

  1. h1#topHeading

  2. h1[id=“topHeading”]

  3. h1

  4. All of the above

Homework Answers

Answer #1

The selectors with id can be used three ways

  1. To select a tag / element with an id, we use hash (#) character, followed by the id of the element.
  2. The name of tag and then hash (#) next the id is specified.
  3. tag name and then id specified in square brackets

Example:
   <h1 id ="idx"> Sample 1 </h1>
  
   We can point to the head tag, by using h1#idx to write css or directly calling with id tag as id will be always unique, we can use id directly to specify its style like #idx

In the above example,

We have specified h1[id="idx"] and set its color to red, then the h1 tag with id as "idx" changed its color to red, next style is with h1#idx it sets font style to italic, even that is reflected on output. But in third style, h1 tag is only present, then we have transformed the text to upper case. That is reflected on two h1 tags. So by this we can understand that by specifying id it can identify and change its properties, without specifying id and only tagname the properties of all tags present in that will be affected. from the above example C option may not only affect that id but also all the tagnames which are similar to that.

So, A, B are correct answers.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Program in HTML, a heading 3 element, with an id attribute who's value is equal to...
Program in HTML, a heading 3 element, with an id attribute who's value is equal to references.
Which of the following style rules will center the text of all h1 through h6 headings...
Which of the following style rules will center the text of all h1 through h6 headings with the text displayed at normal weight? h1 - h6 {    text-align: center;    weight: normal; } h1, h2, h3, h4, h5, h6 {    align: center;    weight: normal; } h1, h2, h3, h4, h5, h6 {    text-align: center;    font-weight: normal; } h1 - h6 {    text-align: center;    font-weight: normal; }
Which one of the following pairs correctly matches a hormone with a disease resulting from its...
Which one of the following pairs correctly matches a hormone with a disease resulting from its deficiency? (a) Luteinizing hormone – Failure of ovulation (b) Insulin – Diabetes insipidus (c) Thyroxine – Tetany (d) Parathyroid hormone – Diabetes mellitus.
Ex#5: Given the following grammar for a simple assignment statements. <assign> --> <id> = <expr> <id>...
Ex#5: Given the following grammar for a simple assignment statements. <assign> --> <id> = <expr> <id> --> A | B | C <exp> --> <id> + <expr> | <id> * <expr> | (<expr>) | <id> Show a leftmost derivation and a parse tree of the following statement: A = A *(B + (C * A))
Which of the following is a valid variable name? Select one: a. ID# b. _Edu2 c....
Which of the following is a valid variable name? Select one: a. ID# b. _Edu2 c. Carat Weight d. 5Years
!DOCTYPE html html head style /style /head body h1This is a Heading/h1 pThis is a strongparagraph/strong,...
!DOCTYPE html html head style /style /head body h1This is a Heading/h1 pThis is a strongparagraph/strong, with some words more strongimportant/strong than others /p pThis is another paragraph./p ul liApple/li liOrange/li liPear/li /ul table tr thFirstname/th thLastname/th /tr tr tdPeter/td tdGriffin/td /tr tr tdLois/td tdGriffin/td /tr /table /body /html Your tasks for this Critical Thinking activity are: Hide the h1 element. It should not take up any space. Display the list items as inline elements. Display the strong elements as...
Find the incremental resistance of a diode which is ID = 0.1mA at temperatures T= 300K,...
Find the incremental resistance of a diode which is ID = 0.1mA at temperatures T= 300K, 250K, and 200. SHOW ALL STEPS AND DERIVATIONS
Which one of the following statements matches M&M Proposition I without taxes? The value of a...
Which one of the following statements matches M&M Proposition I without taxes? The value of a firm is dependent on the firm's capital structure. The cost of equity capital has a positive linear relationship with a firm's capital structure. The dividends paid by a firm determine the firm's value. The cost of equity capital varies in response to changes in a firm's capital structure. The value of a firm is independent of the firm's capital structure.
Use the following response which id most closely related Skeletal muscle requires ____ for contraction Smooth...
Use the following response which id most closely related Skeletal muscle requires ____ for contraction Smooth muscle requires ____ for contraction Cardiac muscle requires ____ for contraction All muscle require ___ for relaxation Neurons require____ for exocytosis of transmitters Neurons stimulate this ___ event in all innervated muscle A. Calcium must bind to calmodulin B. Calcium must bind to troponin C. A calcium dependent protein kinase must be activated D. Calcium must be actively transported into the sarcoplasmic reticulum E....
Scoring: Your score will be based on the number of correct matches. There is no penalty...
Scoring: Your score will be based on the number of correct matches. There is no penalty for incorrect or missing matches. Match the following elements of internal control: Clear All Provides reasonable assurance that business goals will be achieved Used by management for guiding operations and ensuring compliance with requirements Overall attitude of management and employees Identify, analyze, and assess likeliness of vulnerabilities Used to locate weaknesses and improve controls Risk assessment Control procedures Monitoring Control environment Information and communication