HTML
HTML, an acronym for HyperText Markup Language ('hypertext markup language'), refers to the markup language for the development of web pages. It is a standard that serves as a reference for software that connects with the development of web pages in its different versions, defines a basic structure and a code (called HTML code) for the definition of content of a web page, such as text, images, videos., games, among others. It is a standard in charge of the World Wide Web Consortium (W3C) or WWW Consortium, an organization dedicated to the standardization of almost all technologies linked to the web, especially with regard to its writing and interpretation. HTML is considered the most important web language, its invention being crucial in the appearance, development and expansion of the World Wide Web (WWW). It is the standard that has been imposed in the display of web pages and is the one that all current browsers have adopted.
The HTML language bases its development philosophy on differentiation. To add an external element to the page (image, video, script, etc.), it is not embedded directly in the code of the page, but a reference is made to the location of said element. element by text. In this way, the web page contains only text while the task of joining all the elements and displaying the final page falls on the web browser (code interpreter). Being a standard, HTML seeks to be a language that allows any web page written in a certain version to be interpreted in the same way (standard) by any updated web browser.
HTML is a markup language that allows us to indicate the structure of our document through tags. This language offers us great adaptability, a logical structure and is easy to interpret both by humans and by machines.
However, throughout its different versions, various features have been incorporated and removed, in order to make it more efficient and facilitate the development of web pages compatible with different browsers and platforms (desktop PCs, laptops, mobile phones). smartphones, tablets, etc.) However, to correctly interpret a new version of HTML, web browser developers must incorporate these changes and the user must be able to use the new version of the browser with the changes incorporated. Normally the changes are applied through automatic update patches (Firefox, Chrome) or by offering a new version of the browser with all the changes incorporated, on an official download website (Internet Explorer). Therefore, an outdated browser will not be able to correctly interpret a web page written in a higher version of HTML than the one it can interpret, which often forces developers to apply techniques and changes to correct display problems and even HTML code interpretation. Likewise, pages written in an older version of HTML would need to be updated or rewritten, which is not always the case. That is why certain browsers still maintain the ability to interpret web pages from previous HTML versions. For these reasons, there are still differences between different browsers and versions when interpreting the same web page.
Early HTML specifications
Tim Berners-Lee (TBL) in 1991 describes 18 elements that include the initial and relatively simple layout of HTML. Thirteen of these elements still exist in HTML 4.
Berners-Lee considered HTML an extension of SGML, but it was not formally recognized as such until the publication in mid-1993, by the IETF (in Spanish: Internet Engineering Working Group), of a first proposal for a specification of HTML: the draft Hypertext Markup Language by Berners-Lee and Dan Connolly, which included an SGML Document Type Definition to define the grammar. The draft expired after six months, but was notable for its recognition of the browser's own Mosaic tag used to insert images without line feed, which reflected the IETF's philosophy of successfully prototyping standards. Similarly, Dave Raggett's competing draft HTML+ (Hypertext Markup Format) (Hypertext Markup Format) from late 1993 suggested standardizing features already implemented, such as tables.
HTML Markup
HTML is written in the form of "tags", surrounded by angle brackets (<,>,/). HTML can also describe, to some extent, the appearance of a document, and can include or reference a type of program called script, which can affect the behavior of web browsers and other processors. of HTML.
HTML is also used to refer to content of the text/html MIME type or even more broadly as a generic term for HTML, either descended from XML (such as XHTML 1.0 and later) or directly descended from SGML (such as HTML 4.01 and earlier). HTML consists of several vital components, including elements and their attributes, data types, and the document type declaration.
Elements
Elements are the basic structure of HTML. Elements have two basic properties: attributes and content. Each attribute and content has certain restrictions for the HTML document to be considered valid. An element typically has a start tag (for example, <element-name>
) and a closing tag (for example, </element-name>
). The element attributes are contained in the start tag and the content is placed between the two tags (for example, <element-name attribute="value">Content</name -of-element>
). Some elements, such as <br>
, have no content and do not carry a closing tag. Listed below are various types of markup used in HTML.
The structural markup describes the purpose of the text. For example, <h2>Golf</h2>
sets "Golf" as a second-level heading, which would be displayed in a browser similar to the "HTML Markup" heading at the beginning of this section. Structural markup doesn't define how the element will look, but most web browsers have standardized the formatting of elements. Specific formatting can be applied to text using cascading style sheets.
The presentational markup describes the appearance of the text, regardless of its function. For example, <b>bold</b>
indicates that visual web browsers should display text in bold, but does not indicate what web browsers that display text should do. the content in another way (for example, those who read the text aloud). In the case of <b>bold</b>
and <i>italic</i>
, there are elements that look the same but have a more semantic in nature: <strong>strong emphasis</strong>
and <em>emphasis</em>
. It's easy to see how a screen reader should interpret these two elements. However, they are equivalent to their corresponding presentational elements: a screen reader should not loudly say the name of a book, even if the name stands out in italics on a screen. Most presentational markup has been dropped since version 4.01, in favor of cascading style sheets.
Hypertext markup is used to link parts of the document to other documents or to other parts of the same document. To create a link you need to use the <a>
anchor tag together with the href
attribute, which will set the URL to which the link points. For example, a link that displays the address text and goes to our Wikipedia could be of the form <a href=”https://www.wikipedia.org”>https://www.wikipedia.org</a>
. You can also create links to other objects, such as images <a href=”link”><img src=”image” /></a>
.
Attributes
Mostly an element's attributes are name-value pairs, separated by an equals sign "=" and written in the start tag of an element, after the element's name. The value can be surrounded by double or single quotes, although certain types of values can be unquoted in HTML (but not in XHTML). Leaving values unquoted is considered unsafe, however. In contrast to name-element pairs, there are some attributes that affect the element simply by their presence (such as the ismap
attribute for the img
element).
Basic HTML tags
: defines the start of the HTML document, tells the browser that what comes next should be interpreted as HTML code. This is it. de facto, since in theory what defines the type of document is DOCTYPE, which means the word right after DOCTYPE the root tag.
: embeds a script on a web, or calls one by
src="url del script"
. It is recommended to include the MIME type in the attributetype
, in the case of JavaScripttext/javascript
.: defines the header of the HTML document; this header usually contains information about the document that is not directly displayed to the user as, for example, the title of the browser window. Inside the header
It is possible to find:
: define the title of the page. The title usually appears in the title bar above the window.: to link the site to style sheets or icons. For example:
.
: to place the inner style of the page; either using CSS or other similar languages. It is not necessary to place it if it is to link to an external file using the label
.
: for metadata such as authorship or license, even to indicate http parameters
http-equiv=""
) when they cannot be modified because the configuration is not available or due to difficulties with server-side scripting.
: defines the main content or body of the document. This is the part of the html document shown in the browser; within this tag are properties common to the entire page, such as background color and margins. Inside the body
numerous labels can be found. Here are some as an example:
: Represents a self-contained composition in a document, page, app or site, which is intended to be distributed independently or re-usable.
a
: headings or titles of the document with different relevance.
: defines a table.
: row of a board. : cell of a board (must be in a row). : represents the foot of a document or section. The information that is usually added in this block is the author of the document, links to related content, copyright information, legal notices, etc.
: hyperlink or link, inside or outside the website. The pass parameter should be defined through the attribute href. For example:
Ejemplo
is represented as an example.: division of the page. It is recommended, together with css, instead ofwhen you want to align content.
: image. Requires the attribute srcwhich indicates the route in which the image is found. For example:
. It is convenient, for accessibility, to put an attribute
alt="texto alternativo"
.
: label for orderly lists.
: label for messy lists.: tag elements from a list.
: bold text (Disapproved label. It is recommended to use the label
).
: text in italics (Disapproved label. It is recommended to use the label
).
: text slashed (Disapproved label. It is recommended to use the label
).: Before text underlined. From HTML 5 defines differentiated or highlighted text portions of the rest, to indicate corrections for example (unproven tag in HTML 4.01 and redefined in HTML 5).
: structural division of the page that encompasses the main content of the page. Within this label, for example, we find the
.
: Serve to differentiate one text from another.
: Serve to cause a line jump. This tag doesn't close.
: Serves to provoke a change of subject between paragraphs. This tag doesn't close.
: Serve to create a drop-down section
: Serve to create the title of the drop-down sectionMost tags should close like they open, but with a slash (/) as shown in the following examples:
.Contenido de una celda Código de un script integrado en la página
.División estructural en la parte del contenido.
HTML Basics
The HTML language can be created and edited with any basic text editor, such as Gedit on GNU/Linux, Notepad on Windows, or any other editor that supports plain text such as GNU Emacs, Microsoft Wordpad, TextPad, Vim, Notepad++, Atom, Visual Studio Code, among many others.
There are also other editors for creating websites with WYSIWYG characteristics (What You See Is What You Get, or in Spanish: "what you see is what you get"). These editors allow you to see the result of what is being edited in real time, as the document is being developed. Now, this does not mean a different way of creating websites, but rather a somewhat simpler way, since these programs, in addition to having the option of working with the preview, have their own HTML section, which generates all the code as you work on it. Some examples of WYSIWYG editors are KompoZer, Microsoft FrontPage or Adobe Dreamweaver.
Combining these two methods is very interesting, as they somehow help each other. For example, if everything is edited in HTML and the developer forgets some code or tag, it is enough to go to the visual or WYSIWYG editor and continue editing there or vice versa, since there are cases in which it is faster and easier to write the code directly of some characteristic that the user wishes to add to the site than to look for the option in the program itself.
There is another type of HTML editors called WYSIWYM that give more importance to content and meaning than to visual appearance. Among the objectives that these editors have is the separation of content and presentation, essential in web design.
HTML uses tags or markup, which are short start and end instructions, which determine how text, as well as images and other elements, should appear on your screen in your browser. of the computer.
Every tag is identifiable because it is enclosed between the less than and greater than signs (
<>
), and some have attributes that can take some value. In general, labels will be applied in two special ways:- They open up and close, such as: ≤1⁄2⁄2⁄2⁄2⁄2⁄2⁄2⁄2⁄2⁄2⁄2⁄4⁄2⁄2⁄2⁄2⁄2⁄2⁄2⁄2⁄2⁄2⁄4⁄2⁄2⁄2⁄2⁄4⁄4⁄4⁄4⁄4⁄2⁄2⁄2⁄2⁄2⁄2⁄2⁄2⁄2⁄2⁄2⁄2⁄2o,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ bold.
- They cannot be opened and closed, such as ≤/105, which would be seen in your web browser as a horizontal line.
- Others that can be opened and closed, such as θp.
- The basic or minimum labels are:
▪DOCTYPE PHP.html▪ .head▪ .goal charset="utf-8" / 2005 .title▪Example1”title▪ ”head▪ .body▪ .p▪Example paragraph”p▪ ”body▪”html▪
Text editors
For web development, programmers use a text editor. These are normally made for the purpose of ease of programming. There are currently many, such as these: Notepad++, Adobe Dreamweaver, Sublime text, among others.
Learn HTML by analyzing real pages
By selecting the "view source" option in the browser, you can actually see what information the web browser is receiving and how it is interpreting it.
For example: in Internet Explorer, simply pull down the "view" menu and then choose "source code", while in Chrome and Firefox press Ctrl+U. This will open a tab with the source code of the page that is currently being viewed in the browser. Another faster way is to right-click anywhere in the area where the browser displays the web page and choose "View Page Source".
Apart from being able to view the HTML source code of a web page with the options described above, Internet Explorer, Firefox and Google Chrome also incorporate tools known as page inspectors that can be activated with F12.
With these tools it is possible to visualize a web page and select within it a specific element of which we want to know what is the HTML code with which it is made, simply pointing to the element in question with the mouse. By doing this, the code will be displayed in a special area within the browser where the user will be able to see the HTML code in question (see image), as well as the CSS rules that apply to that particular HTML code. This type of analysis is extremely instructive to learn to develop in HTML.
For the Firefox browser, there is also the Firebug plugin as an alternative to the native tool, very similar to the tool that Firefox incorporates by default.
History of the standard
In 1989 there were two techniques that allowed linking electronic documents, on the one hand hyperlinks or links (hiperlinks or links) and on the other hand a powerful label language called sgml. At that time, Tim Berners-Lee, who worked at the CERN European Center for Nuclear Research, informed the press that he was working on a system that would allow access to online files that worked on computer networks or electronic machines based on the TCP/IP protocol. Initially it was developed so that information could be easily shared between scientists from different universities and research institutes around the world.
In the early 1990s, he finally defines HTML as a subset of the familiar SGML and creates something even more valuable, the World Wide Web.
Tim Berners-Lee created the World Wide Web project, as well as a system that made it easy to read information through a browser program. It would be the first web browser, called WorldWideWeb, and developed during the second half of the year 1990; being later renamed Nexus, to avoid confusion due to its name, which was the same as the technology it represented. Two other browsers followed: the Line Mode Browser and the ViolaWWW. The latter, developed in 1992, was the first browser to become popular among early adopters of the World Wide Web.
Pei-Yuan Wei presented ViolaWWW, which would run in text mode and on a UNIX operating system.
Work to create a successor to HTML, called HTML+, began in late 1993. HTML+ was originally designed to be a superset of HTML that would gradually evolve from the earlier HTML format. The first formal specification of HTML+ was therefore given the version number 2 to distinguish it from previous unofficial proposals. Work on HTML+ continued, but it never became a standard, despite being the most formally compositional-like base of current specifications.
The draft HTML 3.0 standard was proposed by the newly formed W3C in March 1995. With it many new capabilities were introduced; for example, facilities for creating tables, making text flow around figures, and displaying complex mathematical elements. Although it was designed to be compatible with HTML 2.0, it was too complex to be implemented with the technology of the time, and when the draft standard expired in September 1995, it was abandoned due to lack of support from web browser manufacturers. HTML 3.1 was never officially proposed, and the next standard was HTML 3.2, which abandoned most of the new features of HTML 3.0 and instead adopted many elements initially developed by the Netscape and Mosaic web browsers. The possibility of working with mathematical formulas that had been proposed in HTML 3.0 became integrated into a different standard called MathML.
In 1997, HTML 4.0 was published as a W3C Recommendation. HTML 4.0 adopted many specific elements initially developed for a particular web browser, but at the same time began to clean up the HTML by marking some of them as deprecated.
HTML 4.0 implements features like XForms 1.0 that do not need to implement navigation engines that were incompatible with some HTML web pages. In 2004 the W3C reopened the debate on the evolution of HTML, and the bases for the HTML5 version were released. However, this work was rejected by the members of the W3C and preference would be given to the development of XML.
Apple, Mozilla, and Opera all announced their interest in continuing to work on the project under the name WHATWG, which is based on backwards compatibility.
In 2006, the W3C became interested in HTML5 development, and in 2007 joined the WHATWG working group to unify the project.
Web accessibility
The HTML design, apart from complying with the specific language specifications, must respect certain web accessibility criteria, following some guidelines or the regulations and laws in force in the countries where this concept is regulated. It is available and developed by the W3C through the Web Content Accessibility Guidelines 1.0 WCAG (recently updated with the 2.0 specification), although many countries have their own specifications, as is the case of Spain with the UNE 139803 Standard.
HTML Entities
Many special characters, letters with tildes, umlauts, or language script symbols can be represented in an HTML document either by themselves or by an entity reference. Among the advantages of using an entity reference, are that of being able to represent Unicode characters using a different character encoding, or to fill in for some missing characters on the keyboard used.
Contenido relacionado
Power electronics
Alphanumeric code
Open Source
Más resultados...