- Joomla! 1.5x Customization: Make Your Site Adapt to Your Needs
- Daniel Chapman
- 557字
- 2021-04-01 13:53:14
HTML
Originally, web pages consisted primarily of many individual files, each containing all the design information and data, and links to any images that needed to be displayed on a single viewable page. This information and data was, and still is, written in a language called HTML.
While many people refer to HTML as a programming language, it is in fact, as the name states, a markup language. That is a language that doesn't provide instructions on something to do (a program) but instead, tells how to display itself and the data it contains.
This means that HTML code by itself is not capable of actually doing anything except structuring and displaying static data in a certain way.
HTML works by putting the data inside tags, indicated with greater than and less than symbols, and these tags tell the reader (usually a web browser) how to organize the data structurally.
Some examples of HTML tags:
<h1>This is a level 1 Header</h1> <p>This is a paragraph</p> <div>This is a div, used to divide information into logical containers.</div> <ul> <li>A List Item (li) in an unordered list (ul).</li> </ul> <span>This is a span of text. </span>
An HTML document almost always has at least the following tags:
<html> <head></head> <body></body> </html>
The <head></head>
tags are used to hold information about the document which affects the display of the data, but does not actually get displayed on the page itself, whereas the <body></body>
tags contain the data that is to be displayed in the web browser.
HTML can also contain extra pieces of information inside the actual tags themselves, and not just between the tags. These bits of information are called attributes. The extra information in these attributes is used to provide extra features and functionality to the HTML when displayed. For example, links and images need to be told where to send people when clicked, or what image to load.
<a href="www.awebsite.com">A link to a website</a> <img src="www.awebsite.com/logo.jpg" />
We probably noticed that the image tag, <img>
, didn't have a closing tag with a slash in it. This is because some tags can be self closed if it doesn't make sense for them to have two tags, such as with our image. To self close a tag, simply put a slash as the last character in the tag.
Note
This is far from a complete guide to HTML, as there are dozens, if not hundreds of guides to HTML online and in book form. Please look to them for more information HTML. Also recommended is the website www.w3schools.com for more detailed information on HTML and its descendant, XHTML.
We can also use a style
attribute in our HTML code to add design elements to what is otherwise only a logical structure.
Originally, this was how most HTML was styled. However, it was quickly realized that mixing design information, structural information, and the data itself into the same file was dangerous and made updating the data difficult without affecting the design, and updating the design was difficult without potentially affecting the data. So an attempt was made to strip the design information out of the HTML files, leaving only the data and data structure in the original files, and putting the design information into separate files.
This led to what is today called cascading style sheets (CSS), separate files containing the majority of the design information for a web page:
- 突破平面Photoshop UI界面設計與制作剖析
- PrestaShop 1.3 Theming – Beginner’s Guide
- Vue.js框架與Web前端開發從入門到精通
- Moldflow模流分析與工程應用
- 從零開始:Flash CS6中文版基礎培訓教程
- CorelDRAW服裝設計實用教程(第四版)
- MLOps實戰:機器學習模型的開發、部署與應用
- Photoshop CS6中文版基礎培訓教程
- 攝影照片修飾完全自學手冊
- 中文版AutoCAD基礎培訓教程
- ANSYS 15.0有限元分析自學手冊
- AutoCAD 2024建筑設計從入門到精通(升級版)
- 精進PPT:PPT設計思維、技術與實踐(第3版)
- Adobe創意大學Premiere Pro產品專家認證標準教材(CS6修訂版)
- Cassandra High Performance Cookbook