HTML Tips for Beginners


Categories
Tags
If you’re just getting into web development you’ll need to learn Hypertext Markup Language (HTML); the standard markup language for creating web pages. These are my top tips for beginners.

Hypertext Markup Language is the standard markup language for creating web pages and web applications. With Cascading Style Sheets and JavaScript, it forms a triad of cornerstone technologies for the World Wide Web.


Top 5 Tips

  1. Comment Code

    You can use comments to explain your code, which can help you or another developer when editing it at a later date. They’re great for reminding you of what various blocks of code are doing and why, they can come in useful when debugging too. Comments are not displayed in the browser, so they’re only visible to someone who’s editing the source code.

    <!-- This is a HTML comment -->

  2. Close HTML Tags

    There are a few tags that don’t require a closing tag (e.g. <br>, which inserts a single line break), but most do. To prevent display issues in your code be sure to close tags properly. The below example shows a paragraph with the appropriate opening and closing tags.

    <p> I'm getting the hang of this now.</p>

  3. Use Indentation

    This won’t affect your code in any way but I find it helps me to keep my code clean and easy to follow. By using indentation you can easily see where each HTML element starts and ends. Some developers like to do this with one or two spaces and others use tabs. Personally, I like to use tabs!

  4. Use Sensible Naming Conventions

    Sensible naming conventions will help you (and others) to better understand what’s what in your code. For example, if you have a class that wraps around a video it would make sense to name it something like ‘video-wrapper’. This will make things easier to follow in your CSS stylesheets too.

    Always keep your code tidy, clean and well-formated.

  5. Follow the Community

    There are some fantastic websites, individuals, companies and organisations out there who are dedicated to making the Internet a better place, through sharing best practice, developing incredible websites and web apps, and talking-out ideas to make things better. The Web Development community is a humble and helpful one on the whole and I’m proud to be apart of it.

    If you’ve been getting into coding you’ve likely accessed a few of these places already, such as StackOverflow, CSS-Tricks and the SitePoint forums. These sites are great to use but you can also find some amazing people/groups to follow on Social Media too. Here are a few of my favourite Twitter accounts:


  6. Learning HTML

    A popular place to learn about HTML is the W3Schools website. You’ll find loads of examples that use various HTML elements, along with exercises and quizzes.

Comments

Whether you have feedback, a question, want to share your opinion, or simply want to say thank you - we welcome comments! Please read the disclaimer.

Disclaimer and Legal Information

The use of any content found on or via this website (code, how to guides etc.) is done so at your own risk. We take no responsibility for any issues encountered.

This blog and its authors will not be held responsible for any misuse, reuse, recycled and cited/uncited copies of content from this website by others.

The views and opinions expressed in this blog are those of the author(s) and do not necessarily reflect the position or opinion of any other agency, organisation, employer or company.

Comments are moderated but we do not take any responsibility for any libel or litigation that results from something written in a comment. We reserve the right to reject or delete any comment for any reason whatsoever (abusive, profane, rude etc). Please keep your comments polite and relevant.

We are happy for you to quote and share our content in any reasonable manner, e.g. post links to our blogs on social media, but not in any way that suggests that we, or our authors, endorse you, your use or your views. Nothing negative please.

We appreciate attributions, e.g. a link to our website (www.dragoncode.co.uk).

Thank you – we hope you find the website useful.