Most browsers give Web developers some special tools to help to write pages. Each browser will be different so you will need to explore them yourselves but this might get you started.
In most browsers you will see the tools if you press F12 on your keyboard. Or look in the menu system. (Web) developer (tools) is the most common name.
Each one is different but try to find at least these in a number of browsers and see which is most helpful:
- a DOM inspector which lets you explore the structure of the HTML and the attached CSS
- either in the DOM explorer/inspector may be an icon with a pointer which lets you click on the actual element and see the code for it: