how do I select a single tag in the middle of many of the same in CSS? -


I have a single "P" tag with many other "P" tags inside the "div" tag. I select only one single tag among those other people so that I can change my style to CSS? I am very new to HTML and CSS, so sorry, this is a stupid question. Thanks!

You can use : nth-child . Therefore the second & lt; P & gt; and

inside div p: nth-child (2) .

Or like Mark B commented, add a class for it.

  
gt; & Lt; P & gt; Hi, & lt; / P & gt; & Lt; P class = 'lionel' & gt; This is me & lt; and < / P>
  div p.lionel {font-weight: bold;}  

or same & lt; P & gt; By using : nth-child ()

  di V p: nth-child (2) {font-weight: bold; }  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -