Hello, fellow campers. So I made this portfolio a few days ago , I am now trying to fix it gradually . I need some tips on how to improve the quality of the code , something like “best practices in HTML and CSS” , Any suggestions? Thanks!
Beautiful site so far!
One thing you can always do is run codepen’s HTML, CSS and JS analysers from the caret menu in the respective panels:
I’d quibble with the skipping of <h*> tags (i.e. going from h1 to h3 without a h2), or using them for anything other than headings. Use CSS to style text instead.
You also have this odd section of empty mark-up at line 26:
<div id="container-1" class="container-fluid"> <div ></div> </div>
great, I did not know this tool, I’m not using much codepen because I do local development. Is there any tool to do this analysis locally? Thats what i need. Also the tags usage, i cant find a nice guide. Thanks!
Codepen relies on linting tools, and there’s lots of those available for various text editors, just google around for the one’s appropriate to your set up.
You can also use validation tools like: https://validator.w3.org
Oh, and the h tags thing isn’t a major issue, and it’s debatable whether it’s an issue at all. To me it makes more sense semantically to have the h tags represent the level of nesting they apply to.