im new to html and i need help! ok what i am trying to do i make my text with a color box behind it ! I NEED THE HTML CODE
<style type="text/css"> .redbox { background-color:red; padding:150px; font-size:23px;} </style> <div class="redbox">MY TEXT</div> If youre actually trying to learn html though, you should probably just start off by reading some online tutorials and testing things yourself rather than getting other people to write it for you.
As above - but I would always recommend using an external style sheet rather than embedded. This would mean rather than having this in the head: <style type="text/css"> .redbox { background-color:red; padding:150px; font-size:23px;} </style> You would have the below code, which links to the external style sheet <link rel="stylesheet" type="text/css" href="style.css" /> You then create a style sheet file called style.css (within the root menu), and within that style sheet you would list all of your css: .redbox { background-color:red; padding:150px; font-size:23px; }