This will be a short post, as div tags are simple and easy to explain.
A div tag on it's own does nothing. It shows up transparent on a web page and you can't see anything. What it does is make a box on a web page that you can then edit using styles or using CSS, which will be on the next post.
You can't actually do anything with the div tag itself except type into it. Even then, the font is a bog standard 'Times New Roman' and in black. This is useless if you want a black background for your website!
This is why they need to be styled. Briefly, as CSS will be covered in the next post, you can change the div's background colour, font style, font weight, size of the box, define any borders and lots of other things. But most importantly (in my opinion anyway) it lets you change the position of the box on a web page. This is key when creating a layout for a website, as you get lots of flexibility for your creativity to run wild!
Next is CSS.
No comments:
Post a Comment