About <div> tag

Connected Tutorial
This question is a follow-up to this tutorial:

Hello Miss, I used this method and i added <h1> and <p> tag between <div></div> then did style it in css like clor,padding,margin etc.but result was error. Miss,then i checked again my coding but coding was true.can you guide me.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @ammara660,

Giving a first look at what you provided as an example everything seems to be correct and should be working properly.

This lead me to test it out on my own as well and in fact it wasn’t working as you mentioned it. After a bit of debugging I found your issue:

<div class=“myDiv”>

See the quotes, they are “ but should be ". That’s the problem, your element is not picking up your class due to the different quotes used.

Regards, KFSys

This comment has been deleted

Hi @ammara660,

Can you please provide us with the mentioned h1 and p tags also the div ones?

Additionally, what error are you seeing? Is it when loading the website? The best way would be for us to see the css options you’ve created.

Regards, KFSys