FANDOM


In an HTML document, CSS Type Selectors match an element based on the element's node name (ex. the node name for <br /> is br and for <p> it's p). This is one of the most common selectors of all, due to its simplicity of understanding and since it is one of the first things you learn in CSS.

Example:

<html>
    <head>
        <title>Title</title>
        <style type="text/css">
            span {
                  text-decoration:underline;
            }
          
            br {
                clear:both;
            }
            
            p {
               text-indent:50px;
               color:green;
            }
        </style>
    </head>
    <body>
      <p>
      <span>This is green underlined text with a 50px indent.</span>
      </p>
      <br />
      This is not. It is only cleared from both sides.
    </body>
</html>

See Also

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.