Computer Science

HTML Code

HTML code, short for HyperText Markup Language, is a standard language used to create and design web pages. It consists of a series of elements, tags, and attributes that define the structure and content of a webpage. HTML code is essential for building websites and is often used in conjunction with other web technologies like CSS and JavaScript.

Written by Perlego with AI-assistance

10 Key excerpts on "HTML Code"

  • Web Marketing for the Music Business
    • Tom Hutchison(Author)
    • 2013(Publication Date)
    • Routledge
      (Publisher)

    Chapter 6

    HTML and Scripts

    HTML: THE BASICS AND WHY YOU NEED THEM

    Hypertext markup language (HTML) is the predominant authoring language for the creation of web pages. HTML defines the structure and layout of a web document by using a variety of tags and attributes to denote formatting of certain text as headings, paragraphs, and lists. HTML is written in the form of tags bracketed by the greater than and less than symbols, such as <tag>. Most tags come in pairs, the opening tag is listed as <tag>, and the closing tag is </tag>, which denotes the end of the previous command. For example, if you wanted to italicize a word in a sentence, you would precede the word with the tag for italics <i> and follow the word with the end tag </i>. Failure to include the end tag would result in everything from that point forward being presented in italics. A web visitor’s browser examines the HTML for instructions on how to display the graphics, text, and other multimedia components. Tutorials can be found at www.w3schools.com .
    When someone types in a URL or clicks on a web page link, the browser requests a document from a web server via the hypertext transport protocol, or HTTP. The server then sends the document back to the user, which is displayed on the browser. The things that are contained in the document (text, photos, audio and video files, etc.) were all put there using HTML structure.
    Most web design programs will allow the novice to build a web site without any knowledge of HTML language, but a basic understanding of HTML Code can come in handy for tweaking web pages and widgets. For example, YouTube now provides options for designing how embedded videos will look on your site—you can select the border color, adjust the size of the thumbnail, and adjust the size of the video window, within limits (see Chapter 8
  • Dynamic Web Programming and HTML5
    Chapter 2

    Webpage Markup with HTML5

    The Hypertext Markup Language (HTML) is a markup language used to organize the contents in a webpage.
    HTML has evolved and HTML5 is the new standard. HTML5 not only supplies a language for webpage markup, but also defines a good number of APIs (application programming interfaces) for JavaScript programs to interact, control, and manipulate the webpage in the context provided by the user agent (UA), which is usually a browser. It also specifies how browsers must support HTML5 features. Unless otherwise indicated, HTML descriptions and codes in this text will follow HTML5.
    HTML provides various elements such as <h2> (second-level header) and <p> (paragraph) with which to structure the page content. HTML enables you to organize text, graphics, pictures, sound, video, and other media content. When a Web browser receives an HTML document, it can then properly format, render, and manage the user interface for the page.
    HTML provides elements for headings, sections, paragraphs, lists, tables, headers, footers, links, figures, images, audios, videos, and forms (for user input). Furthermore, it supports image maps (multiple clickable areas in the same image), embedded objects (for content to be processed by browser plugins), internal frames (page-in-page) and canvases (programmable graphics drawing areas), and so on.
    The major part of a website is usually a set of HTML documents. Learning and understanding HTML are fundamental to Web programming.
    To create HTML files, you may use any standard text editor such as vi, emacs, WordPad (MS/Windows), or SimpleText (Mac/OS). When saving the edited file, make sure to choose UNICODE plaintext encoding in UTF-8. Rich text or other formatted encoding will result in unwanted and erroneous code in the HTML file. Specialized tools for creating and editing HTML pages are also widely available. After creating an HTML document and saving it in a file, with a .html or .htm suffix, you can open that file (by double-clicking the file or using the browser File>Open File
  • JavaScript for Modern Web Development
    eBook - ePub

    JavaScript for Modern Web Development

    Building a Web Application Using HTML, CSS, and JavaScript

    HAPTER 2

    HTML - Creating the Web Content

    “Content is king.” ~ Bill Gates
    H aving gone through the brief history of the web and JavaScript and how it has grown over the years, we will start our journey of modern web development right from the basics.
    In this chapter, we will learn about the first and most important foundation pillar of web development—HTML (HYPERTEXT MARKUP LANGUAGE).
    HTML is actually not a programming language, but it is a markup language. Markup languages are designed for the definition, presentation, and processing of text. It specifies the format of the code. The code is designed in such a way that it is syntactically distinguishable. HTML is the language of the web that web browsers use to compose text, audio, images, videos, graphics, and other materials into rich web pages.

    Structure

    • Getting started with HTML
    • Building blocks of HTML
    • Structure of an HTML document
    • Different HTML elements

    Objective

    At the end of this chapter, you will be able to learn about the features of HTML and how to use HTML to put your content in the form of basic web pages.

    Getting started with HTML

    HTML Code is plain text which can be saved with .html or .htm extension and opened with the browser. The following code is how a basic HTML Code looks like: <!DOCTYPE html> <html> <head> <title>My First HTML</title> </head> <body> <h1>Hello World!</h1> <h2>Welcome to learning HTML!</h2> <p>Welcome to Web Development!</p> </body> </html> You can write the preceding code snippet in a simple notepad, but we will eventually need a specialized code editor as we progress in our web development, so now is the time to select an editor. There are many editors available and you can choose whichever you are comfortable with. Here is a popular list to choose from:
  • Foundations of Data and Digital Journalism
    • Alex Richards(Author)
    • 2023(Publication Date)
    • Routledge
      (Publisher)
    hypertext part of the name describes individual online documents—webpages—threaded together through “hyperlinks”—though today, we’d be more inclined to simply call them “links” instead. Rather than having to thumb through an index to locate and then visit a separate piece of content, a one-way leap could be directly established, like a doorway linking one document to another.
    Ultimately, these hyperlinks between webpages act as the individual connections that make up the World Wide Web, a major component of the internet. They’re significant enough that the terms “web” and “internet” are used almost interchangeably today.
    As a markup language, HTML defines the structure and holds the content of a document, which can include text and references to image files and other digital media, as well as semantic information that gives important cues about what the content represents.
    More importantly, though, a markup language like HTML works together with another language called CSS, which describes how all content should be displayed. These instructions include the visual flourishes—color, dimensions, size, position, and more.
    The concept of a markup language isn’t unique to the internet or the web, and you encounter them in more places than you might think. They keep your Microsoft Word files formatted properly and can feed content to the mobile apps on your phone.
    HTML is no different; it’s just meant to be interpreted and shown by a web browser, like Apple Safari or Google Chrome.
    Figure 10.1 The homepage of the Flatwater Free Press, a nonprofit newsroom based in Omaha, Nebraska.
    So, writing or revising an HTML document goes beyond just the content itself—you’re also writing the instruction manual for the look, feel, and overall experience of a webpage.

    What you need to create HTML

    Before you do anything with HTML, you’ll need the right setup. Just as you needed spreadsheet software like Google Sheets to rearrange and summarize data, you need a place not only to write HTML and CSS, but also to render that code and display it properly. That includes two non-negotiable elements: A text editor
  • Teaching Computational Thinking and Coding in Primary Schools
    • David Morris, Gurmit Uppal, David Wells(Authors)
    • 2017(Publication Date)
    • Learning Matters
      (Publisher)
    6    
    Coding with HTML and Web Design
    Learning outcomes By the end of this chapter you will:
    •    have developed an understanding of the rationale for teaching children to code with HTML; •    understand the role of coding and web design in the primary computing curriculum and how these can be used to engage children at different stages of learning; •    know how to code with HTML yourself and identify how to teach this knowledge to children; •    identify potential opportunities to integrate coding and web design with learning across the curriculum.
    Teachers’ Standards
    A teacher must:
    2.    Promote good progress and outcomes by pupils:
    •    be aware of pupils’ capabilities and their prior knowledge, and plan teaching to build on these.
    3.    Demonstrate good subject and curriculum knowledge:
    •    have a secure knowledge of the relevant subject(s) and curriculum areas, foster and maintain pupils’ interest in the subject, and address misunderstandings.
    4.    Plan and teach well-structured lessons:
    •    contribute to the design and provision of an engaging curriculum. (DfE, 2011)
    Introduction
    Most web pages that you will come across are written in a language called HTML (Hypertext Markup Language). Although other scripts and codes may also be used, HTML provides the basic skeleton upon which the web page hangs. It is important at this stage to point out that HTML is not a programming language, but what is known in computing terms as a markup language. The concept of ‘markup’ originates from the traditional editorial process where paper manuscripts were annotated with written instructions for revisions, and so in this sense, HTML is a system for ‘marking up’ or identifying the components of a web page. This invariably involves things such as headings, paragraphs, pictures and lists as well as the features and attributes of these items such as font size, colour and alignment which determine how the web page looks in a browser. HTML is not immediately visible and lies behind the page you see, but knowing how to code with HTML basically allows you get ‘under the bonnet’ and control or change the way things look.
  • Full Stack Web Development
    eBook - ePub

    Full Stack Web Development

    The Comprehensive Guide

    • Philip Ackermann(Author)
    • 2023(Publication Date)
    • SAP PRESS
      (Publisher)

    2    Structuring Web Pages with HTML

    Along with the Cascading Style Sheets (CSS) style language and the JavaScript programming language, the Hypertext Markup Language (HTML) is one of the three major languages important for frontend development.
    In this chapter, you’ll learn about the HTML language, which is used to define the structure of web pages.
    Figure 2.1     HTML, One of Three Important Languages for the Web, Defines the Structure of Web Pages

    2.1    Introduction

    I don’t want to dwell on the history of HTML too long. Instead, let’s get into the language itself as quickly as possible with just a brief overview of the major versions of HTML.

    2.1.1    Versions

    A complete history of HTML, as well as all the different version numbers and release dates, can be found at https://en.wikipedia.org/wiki/HTML , for example, However, for a quick overview, let’s briefly touch upon following versions:
    • HTML: The first version (without a version number) was published in 1992 and was based on proposals that Tim Berners-Lee (the inventor of HTML) had already worked out in 1989 at the European Organization for Nuclear Research (CERN).
    • HTML 4.0: Released in 1997 and important because CSS became available in this version (see Chapter 3 ).
    • XHTML 1.0: With the appearance of the Extensible Markup Language (XML ), described further in Chapter 6 , the HTML language was reformulated according to XML rules. These rules are more strict than those of HTML 4.0; for example, attributes can only be written in lowercase and must always have a value (Section 2.1.2 ).
    • HTML5: This version was released in 2014 and replaced previous versions of HTML (and XHTML). HTML5, intentionally written with the version number right after “HTML,” introduced a number of new functionalities as well as numerous new web Application Programming Interfaces (APIs), which we’ll discuss in more detail in Chapter 7 .
    Like many other standards on the web, HTML is maintained by the World Wide Web Consortium (W3C ). For a long time, the W3C attached great importance to adopting stable specifications for various standards, which, however, was not conducive to further development of the HTML standard and unnecessarily delayed progress. As a response, various browser manufacturers founded the Web Hypertext Application Technology Working Group (WHATWG ), which then regarded the HTML standard as a “living specification” (living standard
  • Introduction to Web Interaction Design
    eBook - ePub
    2 Assessment & Evaluation in Higher Education DOI: 10.1201/9781315692333-2

    Introduction to HTML

    2.1 Introduction

    HyperText Markup Language (HTML) is the standard markup language for creating Web pages. Although, the knowledge of HTML is, in theory, not necessary to create Web pages, because there are tools that allow you to do this without having to write any code, knowing HTML enables you to customize or refine outputs from these tools, where necessary. Naturally, to be a serious Web designer, the knowledge of HTML could be considered a mandatory skill.
    2.2 Learning Outcomes
    After studying this chapter, you should: Understand the concept of producing a Web page from an HTML document. Be familiar with the basic structure of an HTML document. Know how to create an HTML document with a text editor and render it in a Web browser.

    2.3 About HTML

    Imagine that you have a hand-written document that you want typed out and you do not know how to type or have access to a typewriter, but you know a typist. You would probably annotate (or markup) the document to show how you want it structured and styled, using an agreed convention between you and the typist, and then give the hand-written document to the typist to type. This is the basic principle behind how the Web page creation works, except that in the case of Web page creation, the document to be structured and styled is not hand-written but produced with a computer, the convention used to mark up the document is HTML, the Web browser is the typist, and the finished document is a Web page. Therefore, given an HTML document that is properly marked up, the Web browser parses it and produces the intended Web page. In the past, HTML was used for both the structuring and styling of a document, but this practice is now obsolete. The need for more flexibility and efficiency in the way Web pages are create and maintained has since led to limiting HTML’s role to just structuring a document, while CSS is used for styling and scripting or programming languages are used for more complex functionalities.
  • Untangled Web
    eBook - ePub

    Untangled Web

    Developing Teaching on the Internet

    • David Graham, Diane Mcneil, Lloyd (All Of Nottingham Trent University) Pettiford(Authors)
    • 2014(Publication Date)
    • Routledge
      (Publisher)
    chapter seven
    HTML and creating pages
                7
    He was silent for a few moments, then he said: ‘There is a powerful agent, obedient, rapid, easy, which conforms to every use, and reigns supreme on board my vessel. Everything is done by means of it. It lights, warms it, and is the soul of my mechanical apparatus’
    Jules Verne 20,000 Leagues Under the Sea (1873)
     
    T he core tool for creating web pages is Hypertext Mark-up Language (HTML). It is simply a scripting language that defines the elements of a page and how they appear, and unlike actual programming languages, it is very intuitive to use once you understand its logic. HTML, however, was not intended or designed as a page layout tool – so the creation of the type of layout one would take for granted in, say, a desktop publishing package takes a little ingenuity Like any computer-based language, different versions of HTML are developed all the time, but the current standard version at any given time is delimited by the World Wide Web Consortium. You can find the full specification at its web site, but bear in mind that all the features of the latest version may not yet be supported by all the web browsers. Standardization, or the lack of it, between different brands of browser is one of the more challenging and contentious areas of web development at the time of writing. XHTML promises to improve accessibility to a wider range of platforms, but is not yet the current recommended standard (again, at time of writing).
    The elements of HTML script described here are widely supported amongst current versions of browsers, and we have tried to point out where they are not supported by older versions. We also include some script elements that may not be part of the strict HTML standards, but which are supported by many browsers and are widely used.

    Software

    Although HTML is the basic engine behind web pages, at the time of writing, web page authors, or soon-to-be web page authors, have several choices of what to use to produce it. Each has its pros and cons.
  • New Directions in Internet Management

    Section VIIIManaging Information on the Internet

    Passage contains an image

    Chapter 38

    Creating Internet Server Documents with HTML

    Gilbert Held
    THE HYPERTEXT MARKUP LANGUAGE (HTML) PROVIDES A STANDARDIZED MECHANISM FOR CREATING A WIDE RANGE OF DOCUMENTS . Users can create menus as well as generate database query results or online documentation. Because the HTML standard also provides a simple format for representing linked information, users can then view these links and skip around in the document to retrieve related information.
    Because HTML gives developers a standardized mechanism for creating linked-list information displays, it also simplifies program maintenance. Anyone familiar with the structure of the language can easily modify the efforts of other employees when organizational requirements change. Consequently, the use of HTML can potentially lower program maintenance costs as well as make it relatively easy to shift personnel resources between projects when required.
    HTML is a subset of Standard Generalized Markup Language, or SGML, which is an International Standards Organization (ISO) standard for formatting a text document in which the actual formatting commands are embedded in the text. Although the development of HTML coincided with the development of World Wide Web (WWW) servers on the Internet, HTML-created linked-list queries and database retrieval connections can also operate on individual workstations or on local area network client/ server connections. Organizations may wish to consider using HTML for generating linked-list information not only for WWW servers but also for applications such as computer-based training.

    HTML DOCUMENTS IN OVERVIEW

    An HTML document is similar to a text file and can be created using any text editor or word processor with an unformatted American Standard Code for Information Interchange file output. Each HTML document consists of three parts:
  • Teach Yourself VISUALLY HTML and CSS
    • Guy Hart-Davis(Author)
    • 2023(Publication Date)
    • Wiley
      (Publisher)
    CHAPTER 2 Creating Your First Web Pages
    In this chapter, you briefly study the anatomy of a web page before launching Visual Studio Code, configuring it, and using it to create your first web pages. You learn to add headings, text, and comments to web pages; view a page’s source code and validate HTML; and create hyperlinks between web pages.
    Study the Anatomy of a Web Page Tell Visual Studio Code Which Folder to Use Create Your First Web Page Open the Web Page in a Browser Add Headings and Text Nest One Element Within Another Element Add Comments Apply Direct Formatting View a Page’s Source Code Validate a Web Page Create Another Web Page Understanding the Essentials of Hyperlinks Create a Hyperlink Between Your Web Pages Interpret HTTP Status Codes
    Study the Anatomy of a Web Page In HTML, each web page has the same basic structure, no matter how simple or complex the page is.
    An HTML web page starts with a DOCTYPE definition that specifies the document’s encoding type. Next comes a statement of the language used, such as lang="en" to indicate English. After that, the web page consists of a head element and a body element. The head element contains information about the document, such as the page title and the base URL for links. The body element holds the remaining content of the web page, such as headings, text, and linked media files.
    Identify the Four Key Elements of a Web Page Each valid HTML page must contain four key elements, as illustrated in the nearby code:
    • DOCTYPE declaration. This declaration tells the browser the document type of the HTML page. The browser needs this information to interpret the document’s codes correctly.
    • <html> tags. The whole of the web page appears between the opening <html> tag and the closing </html> tag. These tags show you the standard format for two-part tags: The closing tag consists of a forward slash, / , and the same text as the opening tag. For example, you use the <p> opening tag to tell HTML to start a paragraph and the </p>
Index pages curate the most relevant extracts from our library of academic textbooks. They’ve been created using an in-house natural language model (NLM), each adding context and meaning to key research topics.