Saturday, November 5, 2022

The Structure of an HTML File

  • An HTML file consists of the text to be displayed on the page, interspersed with various commands enclosed in angle brackets, which are known as tags.
  • HTML tags usually occur in pairs. The opening tag begins with the name of the tag. The corresponding closing tag has the same name preceded by a slash. The effect of the tag applies to everything between the opening and closing tag.
  • The only HTML tags you will need to use for most of the course appear in the template on the next page, which describes the structure of the HTML index file, which is conventionally called index.html
Standard index.html Pattern One or more script tags to load JavaScript code. Contents of the page, if any. 

 • The following components of index.html are standardized: 
– Every file begins with a  <!DOCTYPE html> tag
– The entire content is enclosed in <html> and </html> tags. 
– The file begins with a <head> section that specifies the title and JavaScript files to load. 
– The file includes a <body> section that specifies the page.
 
Structure html file


No comments:

Post a Comment