DEV Community

Richard Pascoe
Richard Pascoe

Posted on

HTML Fundamentals

Continuing to learn on freeCodeCamp over the last couple of days. This time more theory on HTML Fundamentals, along with a workshop for a Bookstore Page. Again, I really like these theory-based lessons on the latest version of the Responsive Web Design certification, as they help reinforce learning.

What are DIV Elements

For some reason, I never fully grasped that the Div element is a container used to group other elements. The lesson did help clarify things, explaining the differences between Div and Section elements - the latter being semantic.

What Are IDs and Classes

How many of us starting out in Web Development has confused IDs with Classes? I can't be the only one, right? I now understand that IDs have to be unique and are best used on a single element, whereas Classes are useful when wanting to use a set of styles on a number of elements. The follow-up multiple choice questions helped separate the two further still.

What Are HTML Entities

I believe HTML Entities being part of the Reponsive Web Design curriculum is a fairly new addition, at least since I last gained the certiication a few years ago. Their use as an HTML entity used to represent a reserved character is an important one, enabling things like the <img> tag to be displayed on a webpage.

Role of the Script Element

The use of the Script element in webdev is also important, as it is used to execute embeded code, such as JavaScript. Just like with CSS, it's best to link to an external file. This is called separation of concerns but I did not know it was a design principle until now. Below is an example of linking to an external JavaScript file:

<script src="path-to-javascript-file.js"></script>
Enter fullscreen mode Exit fullscreen mode

After completing the theory lessons, I started on the workshop for the Bookstore Page, I will be hoping to complete that and more later on today. So, until next time, continue to code my friends!

Written by a Human logo

Top comments (0)