html - which of the h1 tag code is correct? -


I want to know which of the following codes are correct ... all three ...

& lt; H1 & gt; & Lt; Span class = "bold" & gt; RestState & lt; / H1> & Lt; H1 & gt; Realestate & lt; / H1> & Lt; H1 square = bold & gt; Real estate & lt; / H1>

Please let me know about that ...

The best option would be 4:

  & lt; H1 class = "main-title" & gt; ReState & lt; / H1>  

You should give your classes a semantic meaning - the main title will always be a main title, but what happens if the designer decides they will be better underlined? You will end with:

  .bold {font-weight: normal; Text-decoration: underlined; }  

Which is the most deceptive!


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -