-3

please, which is better? benefits and disadvantages

Html Layouts

<header> 
< nav> 
< aside>

or

css layouts (divs with float)

thanks

2 Answers2

0

It looks like you haven't understood the whole concept of building websites yet and I really recommend that you go through a good HTML tutorial first.

To answer your question: You cannot compare HTML markup to "using divs with float". The main purpose of HTML tags is to structure your site. If you don't use anything but elements it might work, but your text is unreadable and there are lots of disadvantages - for example that screen readers cannot understand the site or bad SEO.

You should always use the appropriate HTML tag and style it using CSS. One example: You might want to have a heading which is smaller than a subheading. Nevertheless you should still use for the main heading and style it using CSS h1 {font-size: 0.8em;}

Tags are often used as containers and are very useful as well. They complement your site structure.

Stefan Blamberg
  • 816
  • 9
  • 24
-1

HTML is used to structure the layout of the webpage, like the bones in our body and CSS is everything else covering those bones (skin, muscle, clothing, etc).

Example: You want to create a login page.

HTML - creates the text field elements and the labels
CSS - sets the font style, text field shape and size, background color/image, submit button's color, corner roundness, etc.

btrballin
  • 1,420
  • 3
  • 25
  • 41