Reputation: 7877
As we know if we take h1 tag or like that, It has its own style(some bold font weight and larger size). Also there are specific built in styles for p,center,h1,h2... so on. What is difference between styling div with css(same as h1) and using h1 tag for the same Or how html work for those tags.
Upvotes: 1
Views: 2212
Reputation: 3846
Apart of the obvious, default browser styles for specific HTML tags, the difference is that in HTML5 tags mark the type of data that it holds. <author>, <aside>, <address>
etc.(although nothing stops you from using different type of data for those tags)
Also search engines rely heavily on the data that each html tag holds, so the data in H1 is most certainly of higher value than in a simple div which is a kind of a generic block html element that usually doesn't have any styles applied.
Upvotes: 2
Reputation: 49095
What is difference between styling div with css(same as h1) and using h1 tag for the same?
HTML is not just about the 'look and feel' of a web-page, it is also about semantics.
An h1
(or the new header
tag) is expressing the 'headerness' of the content, while a div
(even with appropriate style) does not.
You can read more on Wikipedia: http://en.wikipedia.org/wiki/Semantic_HTML
Upvotes: 1
Reputation: 6793
styling div with css(same as h1) and using h1 tag(difference)
My Answer for the above line:
H1 is the Most Important Phrase or Sentence on Your Page
If you think of a Web page as an outline, the H1, H2, etc. heading tags serve to divide the page into sections. Your most important headline is your H1 headline. This generally indicates the topic for the entire Web page and is where most people look first when they're trying to figure out what the page is about. Since search engines first priority is to provide search results that people want, they try to use the same techniques to determine what a page is about. So content in the H1 tag will be considered most important and given a slightly higher rank than other content on the page...
Source: ABOUT.com (for more information)
Upvotes: 1