HTML Structure – Engineering Technology Services (2024)

Overview

HTML (HyperText Markup Language) files are, basically, just simple text files that you could create in any text editor. But to be displayed correctly on the World Wide Web, an HTML document must be structured correctly. Any variation from this structure will cause many web browsers to show the content incorrectly or not at all. Also, all HTML documents must have a suffix of “html” for the HTML code to be viewed correctly by a web browser.

The rule-making body of the Web, the people who determine what this stucture is, is the World Wide Web Consortium (W3C). Web browsers are supposed to follow these standards as close as possible. For the most part they all do well, but some browsers fall quite short of this goal (Internet Explorer being the worst culprit). Nonetheless, it is best when you are creating a web page to follow the current web standards. This will ensure your site is viewable in as many browsers as possible. All HTML instruction on this ETS site follows the W3C standards.

Example

<!DOCTYPE HTML>
<html>
<head>
<meta charset=utf-8">
<title>A Simple HTML Example</title>
<style>
p {text-align:center;}
</style>
</head>
<body>
<h1>This is a header</h1>
<p>This is a paragraph, centered on the page.</p>
<p>And this is the second paragraph with <strong>bold text</strong>.</p>
</body>
</html>

This code generates a page that looks like:
HTML Structure – Engineering Technology Services (1)

In the above example, you can see the use of tags which are an essential part of an HTML document. An HTML tag consists of a left angle bracket (<), a tag name (such as "h1") and a right angle bracket (>). Tags are usually paired so that you have a tag at the beginning and the end of a section of the document (<h1> and </h1> for example.) All end tags look identical to the beginning tag except a slash (/) precedes the tag name within the brackets. A pair of tags delineates where the tag's effect should begin and end on the page. The current web standard from W3C suggests that all tag names be lowercase.

Attributes

Some tags may also include an attribute, which is additional information that is included only within the start tag. Attributes are specific to each tag, although there are many similarities. Some tags must have an attribute to function properly. An example of an attribute is shown in the first paragraph tag shown in the example above (<palign="center">.) The web standards suggests that all attribute parameters be contained within quotes. For example, it is not correct to have this: <p align=center>

Closing Tags

Also, all nested HTML tags must be ended in the reverse order they were created. For example, this is incorrect: <h1><b><i>This is a bold and italic header</h1></i></b> Because the <h1> tag was created first, it must be closed last and since the <i> tag was created last, it must be closed first. All of the tags must open and close within each other like a set of Russian nesting dolls.

Here is the correct example: <h1><b><i>This is a bold and italic header</i></b></h1>

Tag Placement

Within a web page, some HTML tags are required for the page to be displayed correctly. These tags are <html>, <head>, <title> and <body>. The <html> tags must begin and end the document and the <head> tags must appear before the <body> tags. Also, the <title> tags must be within the <head> tags. A simple explanation of each of these tags follows:

  • <html> This tag and its end tag must be the first tag (after the Doctype) and the last tag in your document. It tells the browser that everything within these tags should be viewed as HTML-coded information and should be parsed accordingly by the browser.
  • <head> This tag and its end tag sets apart the section of your document that will not be visible on your web page but helps the browser in working with the document. Many different tags can be placed within the <head> tags, but in our example above we only have the required tag, <title>.
  • <title> This is an identifier for the overall content of a document. This is not displayed within your web page, but (usually) at the top of your browser application's window titlebar. For example, this web page's <title> is "ETS - HTML Basics - Structure" as you can see by looking at the titlebar of this browser window. This title is also displayed in a browser's history and bookmarks, so it is best to be descriptive with this tag so that it will understandable out of context.
  • <body> This tag contains all elements of your document that will appear within a browser's window. This is the content of your document and is where the majority of HTML tags will be placed.

There are many more HTML tags that you will use to create your web page, but these four must always be within your document and ordered in the manner shown in the example above.

HTML Structure – Engineering Technology Services (2024)

FAQs

What is an HTML question answer? ›

Answer: HTML is the abbreviation for Hypertext Markup Language. It is the typical documents' markup language for developing web pages to display on the web browser.

Is HTML CSS enough to get a job? ›

Can I get a job with just HTML and CSS? It's a question we get here at Skillcrush all the time, and the short answer is yes, with caveats. If you want to start working in tech, the first thing you should do is learn HTML and CSS.

How hard is HTML coding? ›

Myth #3: It's difficult to learn HTML

HTML is actually considered one of the easiest programming languages to learn. Unlike complex programming languages that involve intricate logic and problem-solving, HTML predominantly focuses on structure and organization.

What is the structure of the HTML structure? ›

Within a web page, some HTML tags are required for the page to be displayed correctly. These tags are <html> , <head> , <title> and <body> . The <html> tags must begin and end the document and the <head> tags must appear before the <body> tags. Also, the <title> tags must be within the <head> tags.

What is an HTML one-line answer? ›

Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content.

How long does it take to learn HTML? ›

Students will need a few weeks of training to become comfortable with HTML & CSS and a few months of training to become proficient. Having prior coding experience will greatly benefit new HTML & CSS students, mainly because they will be more comfortable with the act of writing code.

What is the salary of an HTML developer? ›

Average Annual Salary

Very High Confidence means the data is based on a large number of latest salaries. Html Developer salary in India ranges between ₹ 1.0 Lakhs to ₹ 7.2 Lakhs with an average annual salary of ₹ 3.8 Lakhs. Salary estimates are based on 1.6k latest salaries received from Html Developers.

Which is more difficult HTML or CSS? ›

CSS might be hard to master, but without logic, errors are less troublesome. JavaScript will likely take longer to grasp than CSS, but both are notably more difficult than HTML. Despite this, JavaScript and Python are still considered two of the easiest programming languages to learn and are recommended for beginners.

Can I learn HTML in 2 hours? ›

I want to use the shortest time possible without missing anything. If you want to completely learn these languages from basics to advance then you should have to spend 2 hours a day and you will become a web developer in next 3 to 4 months.

Which is harder, Python or HTML? ›

HTML vs Python: A Comprehensive Comparison. HTML has a relatively easy learning curve as it primarily focuses on defining the structure and content of web pages. It involves understanding the basic tags and their usage. Python is a beginner friendly and a very simple programming language.

What are the 4 basic HTML tags? ›

There is a range of HTML tags, they help you to design your web page. There are four required tags in HTML. These are html, title, head and body. The table below shows you the opening and closing tag, a description and an example.

What is the difference between HTML and HTML5? ›

HTML requires an internet connection to access documents on the Internet. HTML5 provides users the ability to use web applications to work in offline mode. All modern browsers support HTML. HTML5 is compatible only with a few browsers as some browsers may not support its new features.

What is main HTML structure? ›

The <main> HTML element represents the dominant content of the <body> of a document. The main content area consists of content that is directly related to or expands upon the central topic of a document, or the central functionality of an application.

What is HTML in short answer? ›

HTML (Hypertext Markup Language) is a text-based approach to describing how content contained within an HTML file is structured. This markup tells a web browser how to display text, images and other forms of multimedia on a webpage.

What does the HTML stand for in a question? ›

HTML (Hypertext markup language) is the main markup language for creating web pages and other information that can be displayed in a web browser.

What is the purpose of HTML answer? ›

HTML HyperText Markup Language is used to create Web pages and tells the browser how to display them. It designs the basic layout and formatting of Web pages. HTML is made up of elements or tags and attributes which work together to identify document parts and tell the browser how to display them.

What is HTML tag short answer? ›

HTML tags are the keywords on a web page that define how your web browser must format and display your web page. Almost all tags contain two parts, an opening, and a closing tag.

Top Articles
How to Accept Credit Card Payments Manually | Manual Credit Card Processing
ATAS Trading Platform - Order Flow Trading | AMP Futures
11 beste sites voor Word-labelsjablonen (2024) [GRATIS]
Best Pizza Novato
Skycurve Replacement Mat
Mopaga Game
Ymca Sammamish Class Schedule
Craigslist Mpls Mn Apartments
Red Wing Care Guide | Fat Buddha Store
Pj Ferry Schedule
Chuckwagon racing 101: why it's OK to ask what a wheeler is | CBC News
Back to basics: Understanding the carburetor and fixing it yourself - Hagerty Media
Lesson 1 Homework 5.5 Answer Key
Waive Upgrade Fee
Florida (FL) Powerball - Winning Numbers & Results
Moe Gangat Age
What is a basic financial statement?
Lesson 2 Homework 4.1
Miami Valley Hospital Central Scheduling
Reddit Wisconsin Badgers Leaked
Think Up Elar Level 5 Answer Key Pdf
Hijab Hookup Trendy
Craigslist Panama City Fl
Icommerce Agent
Allybearloves
Tips on How to Make Dutch Friends & Cultural Norms
Ups Print Store Near Me
Theater X Orange Heights Florida
Directions To Cvs Pharmacy
15 Primewire Alternatives for Viewing Free Streams (2024)
Amelia Chase Bank Murder
Publix Coral Way And 147
Myra's Floral Princeton Wv
Gasbuddy Lenoir Nc
Does Iherb Accept Ebt
Keeper Of The Lost Cities Series - Shannon Messenger
Topos De Bolos Engraçados
How To Upgrade Stamina In Blox Fruits
Carroll White Remc Outage Map
Sarahbustani Boobs
Flappy Bird Cool Math Games
Autozone Battery Hold Down
Holzer Athena Portal
City Of Irving Tx Jail In-Custody List
Fresno Craglist
Grandma's Portuguese Sweet Bread Recipe Made from Scratch
Frank 26 Forum
How To Connect To Rutgers Wifi
Morgan State University Receives $20.9 Million NIH/NIMHD Grant to Expand Groundbreaking Research on Urban Health Disparities
Les BABAS EXOTIQUES façon Amaury Guichon
login.microsoftonline.com Reviews | scam or legit check
Latest Posts
Article information

Author: Chrissy Homenick

Last Updated:

Views: 6391

Rating: 4.3 / 5 (74 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Chrissy Homenick

Birthday: 2001-10-22

Address: 611 Kuhn Oval, Feltonbury, NY 02783-3818

Phone: +96619177651654

Job: Mining Representative

Hobby: amateur radio, Sculling, Knife making, Gardening, Watching movies, Gunsmithing, Video gaming

Introduction: My name is Chrissy Homenick, I am a tender, funny, determined, tender, glorious, fancy, enthusiastic person who loves writing and wants to share my knowledge and understanding with you.