Understanding Code

What is HTML?

Defining HTML

HyperText mark-up language, or HTML, is a coding language used to write web pages. In particular, the “markup” of HTML means that coders annotate the web content so that computers (and people) can read the content.

The Basic Parts of HTML Code

The parts of HTML code are simple. Every line of code begins and finishes with a “tag,” or pairs of left and right-angle brackets. The opening tag features a “character” labeling what the type of content that code will address. The opening tag often features an “attribute” as well to make this label more specific. The closing tag simply adds a slash mark to tell the computer the line is complete.

The character p (which stands for “paragraph”) appears within the opening and closing tags. An HTML code example looks like this:

                                
                                    <p>This HTML code creates a paragraph of text.</p>
                                
                            

Another example of HTML code with an attribute is this:

                                
                                     <a href="http://umd-arachne.github.io">Arachne Web Development</a>
                                
                            

The character a means a hyperlink. The attribute href abbreviates “hyperlink reference,” and tells the computer what kind of hyperlink it is searching for and where the computer can find it. Here, the hyperlink goes to another website. You can also add links to files on your computer as well with href.

Tags, characters, and attributes are all the parts you need to write HTML code. If you would like to read more about HTML, please check out our Glossary entry.

Organizing your Directories

It is important that your files stay organized so you can reference them easily in your code. The standard way to do this in web development is by using a directory. A directory is the central location of all the files for your website. One main folder houses all your HTML web pages and sub-folders for all your images, fonts, and scripts.