CSS3 Selectors: nth-last-child

This entry is part 30 of 40 in the series CSS3 Selectors

E:nth-last-child(n):- An E element, the n-th child of its parent, counting from the last one.

This is another option available for targeting one or more specific children of a given parent element.
HTML Table

<!DOCTYPE html>
<head lang='en'>
    <meta charset='UTF-8'>
    <title>HTML Table</title>
        div#introduction p:nth-last-child(1) {
            color: blue;
            font-family: Arial;
<div id='introduction'>
    <p>Ushuaia is the capital of Tierra del Fuego.</p>

    <p>It is commonly regarded as the southernmost city in the world.</p>

    <p>Ushuaia is bounded on the north by the Martial mountain range and on the south by the Beagle Channel.</p>


Series Navigation<< CSS3 Selectors: Format alternate rows in a table using nth-child
CSS3 Selectors: Only-child >>