How HTML works
Jun 10, 2021HTML is a formal recommendation by the World Wide Web Consortium (W3C) and is generally adhered to by all major web browsers, including both desktop and mobile web browsers. HTML5 is the latest version of the specification.
How HTML works
HTML is a text file containing specific syntax, file and naming conventions that show the computer and the web server that it is in HTML and should be read as such. By applying these HTML conventions to a text file in virtually any text editor, a user can write and design a basic webpage, and then upload it to the internet.
The most basic of HTML conventions is the inclusion of a document type declaration at the beginning of the text file. This always comes first in the document, because it is the piece that affirmatively informs a computer that this is an HTML file. The document header typically looks like this: <!DOCTYPE html>. It should always be written that way, without any content inside it or breaking it up. Any content that comes before this declaration will not be recognized as HTML by a computer.
Doctypes are not just used for HTML, they can apply to the creation of any document that uses SGML (Standard Generalized Markup Language). SGML is a standard for specifying a specific markup language being used. HTML is one of several markup languages that SGML and doctype declarations apply to.
The other critical requirement for creating an HTML file is saving it with a .html file extension. Whereas the doctype declaration signals HTML to the computer from the inside of the file, the file extension signals HTML to the computer from the outside of the file. By having both, a computer can tell that it's an HTML file whether it's reading the file or not. This becomes especially important when uploading the files to the web, because the web server needs to know what to do with the files before it can send them to a client computer for the inner contents to be read.
After writing the doctype and saving as an HTML file, a user can implement all the other syntactic tools of HTML to customize a web page. Once finished, they will likely have several HTML files corresponding to various pages of the website. It's important that the user uploads these files in the same hierarchy that they saved them in, as each page references the specific file paths of the other pages, enabling links between them. Uploading them in a different order will cause links to break and pages to be lost, because the specified file paths will not match the pages.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras sed sapien quam. Sed dapibus est id enim facilisis, at posuere turpis adipiscing. Quisque sit amet dui dui.
Stay connected with news and updates!
Join our mailing list to receive the latest news and updates from our team.
Don't worry, your information will not be shared.
We hate SPAM. We will never sell your information, for any reason.