Webpages fail to load correctly on all browsers due to issues with the HTML files

I've been working with examples from MDN and an online course for a few days now. Suddenly, my HTML files are not loading correctly in any browser I try (Firefox, Chrome, IE, Edge). Most of the body content is missing.

This issue began last night. Any HTML files created prior to that work perfectly fine.

To troubleshoot, I tested my code on Codepen and it displayed perfectly there, adding to my confusion.

For editing, I use Sublime Text 2.

Any advice or suggestions would be greatly appreciated.

<!DOCTYPE html>
<html>
    <head>
        <title>Photo Blog</title>
        <link rel="stylesheet" type="text/css" href="photos.css">
        <link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet">
    </head>
    <body>
        <p>Look at the Photos!</p>
        <img src="http://c1.staticflickr.com/9/8450/8026519634_f33f3724ea_b.jpg"> 
        <img src="http://c2.staticflickr.com/8/7218/7209301894_c99d3a33c2_h.jpg"> 
        <img src="http://c2.staticflickr.com/8/7231/6947093326_df216540ff_b.jpg"> 
        <img src="http://c1.staticflickr.com/9/8788/17367410309_78abb9e5b6_b.jpg"> 
        <img src="http://c2.staticflickr.com/6/5814/20700286354_762c19bd3b_b.jpg"> 
        <img src="http://c2.staticflickr.com/6/5647/21137202535_404bf25729_b.jpg"> 
        <img src="http://c2.staticflickr.com/6/5588/14991687545_5c8e1a2e86_b.jpg"> 
        <img src="http://c2.staticflickr.com/4/3888/14878097108_5997041006_b.jpg"> 
        <img src="http://c2.staticflickr.com/8/7579/15482110477_0b0e9e5421_b.jpg">
    </body>
</html>

CSS

img{
    width: 30%;
    float: left;
    margin: 1.66%;
}

p{
    font-family: Raleway;
    margin-left: 1.66%
    font-size: 23 px;
    font-weight: 800;
    text-transform: uppercase;
    border-bottom: 2px solid #f1f1f1;
    width: 30%;
    padding-bottom: 20px;
}

Answer №1

Check out the following code snippet

<!DOCTYPE html>
<html>
<head>
    <title>Cool Photo Blog</title>
    <link rel="stylesheet" type="text/css" href="photos.css">
    <link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet"> 
</head>
<body>
    <p>Feast Your Eyes on These Photos!</p>

<img src="http://c1.staticflickr.com/9/8450/8026519634_f33f3724ea_b.jpg"> 
<img src="http://c2.staticflickr.com/8/7218/7209301894_c99d3a33c2_h.jpg"> 
<img src="http://c2.staticflickr.com/8/7231/6947093326_df216540ff_b.jpg"> 

<img src="http://c1.staticflickr.com/9/8788/17367410309_78abb9e5b6_b.jpg"> 
<img src="http://c2.staticflickr.com/6/5814/20700286354_762c19bd3b_b.jpg"> 
<img src="http://c2.staticflickr.com/6/5647/21137202535_404bf25729_b.jpg"> 

<img src="http://c2.staticflickr.com/6/5588/14991687545_5c8e1a2e86_b.jpg"> 
<img src="http://c2.staticflickr.com/4/3888/14878097108_5997041006_b.jpg"> 
<img src="http://c2.staticflickr.com/8/7579/15482110477_0b0e9e5421_b.jpg">

</body>
</html>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Personalize the Button Color of the Ocean Blue template in Azure AD B2C

Being new to Azure, I might have overlooked something, so please forgive me if that's the case. I recently experimented with the Azure AD B2C Login screen and found the Ocean Blue template for my login page quite appealing. It offers a simple layout. ...

Scroll issue causing CSS not to be applied to a field within a div

Can someone help me with this issue I'm facing in my jsfiddle example? Here is the link: http://jsfiddle.net/AnnaMiroshnichenko/xjyb8/1/. The problem is, when I scroll the div, the field underneath the scroll does not appear to be applying CSS rules p ...

What could be causing the issue with object-fit not functioning properly within a container with a max

My goal is to insert a video into a container that has a width of 100% and automatically adjusts its height while maintaining the aspect ratio, but with a maximum height set. I want the video to completely fill the container even if some parts are cropped ...

Trouble with Chrome's CSS making table cell display as block

After searching, I stumbled upon this question that appeared to have the solution I needed. Surprisingly, even when using chrome 32.0.1700.102, the fiddle provided in the first answer worked perfectly for me. However, when I copied the HTML code into a ne ...

"Exploring the World of Button Coloration

I'm struggling with customizing the colors of each of the 4 buttons that link to different tables using CSS. I want to assign a specific color to each button, like red for the first one and blue for the second. Your assistance in this matter would be ...

Placing a pseudoelement amidst the track and thumb of a range input type

I'm trying to position a pseudo element with a specific z index that is lower than the thumb of an input type range but higher than its track. This is what I have so far: HTML: <div class="range"> <input type="range" name="" class="progre ...

Clicking on the menu to reveal the dropdown options using JavaScript

I have created a drop-down menu for my website, but I am facing an issue. When I click on the links again, it does not work properly because I lack expertise in JavaScript. I would appreciate any help and suggestions from all of you. Thank you for your tim ...

What is the best way to maintain consistent scaling for elements of varying widths and heights?

I'm searching for a method to evenly scale my elements regardless of their width and height. I don't want them to be proportional to their size. Check out the JSFiddle version body, html { height: 100%; width: 100%; margin: 0; backgro ...

The search function on my blog is not displaying the blogs that have been filtered

I have encountered an issue with my code as I am unable to get any search results from the search bar. const RecentBlogs = ({recentBlogs}) => { const [query, setQuery] = useState("") const filteredItems = (() => { if(!query) return rec ...

What is the best way to ensure that the navigation is properly displayed with Bootstrap 4?

While updating a website and incorporating Bootstrap 4 beta, I encountered an issue with the navigation display. Despite making some adjustments, it remains in a vertical format - images are attached for reference. https://i.sstatic.net/BKhWb.png Below i ...

"Unexpected discrepancy: Bootstrap Glyphicon fails to appear on webpage, however, is visible

I am having some trouble getting the glyphicon to display properly in my side nav. The arrow head should rotate down, which is a pretty standard feature. Here is the link to the page: The glyphicon should be visible on the "Nicky's Folders" top leve ...

What is the best way to create a line break within a loop in React?

I have a react component that I need to format into multiple lines, specifically having 2 boxes on top and 3 below in a looped return. The desired layout is to stack the boxes in 2x2 or 2x3 depending on the total number of boxes generated by the loop. So, ...

What is preventing me from running my alert script in JavaScript?

Need some assistance here. I have a simple question. I am trying to create an alert function using JavaScript, but it is not working. <script type="text/javascript"> $(".delete").click(function(){ alert("Are you sure?&q ...

Applying CSS to inherit styles

I have a group of divs with a similar style, but each one has different padding and margin settings. Here is an example: <div class="mainStyle" id="cc">CC</div> <div class="mainStyle" id="bb">BB</div> <div class="mainStyle" id=" ...

Modifying multiple heading tags simultaneously with jQuery

Currently utilizing jQuery to append a string to all heading tags (h1, h2,..., h6) and display it on the screen. Seeking guidance specifically for the replacing aspect, and open to solutions using plain javascript as well. The code I have so far, which I ...

Concealing table columns using JavaScript - adapt layout on the fly

I am currently implementing a responsive design feature on my website, where I need to hide certain columns of a table when the viewport size decreases beyond a specific point. Initially, I tried using .style.visibility = "collapse" for all <tr> elem ...

Trouble with punctuation marks causing difficulty in obtaining address information within an Ionic Angular app

I am currently working on a project in Ionic Angular where I need to fetch and display user address details from the backend on an HTML page. The address details consist of three fields: Address line1 (mandatory), Address line2, and Address line3 (non-ma ...

CSS code completion in PhpStorm is not functioning properly for Twig extended templates

Currently, I am working with PhpStorm 2016.1 and facing an issue with file autocomplete. The scenario is as follows: @mycss .style {color : red} @base.html.twig [...] <link rel="stylesheet" href="/vendor/mycss.css" /> <!--HERE AUTOCOMPLETE OF s ...

It is not possible to alter or manipulate dynamic content received from an Ajax/JSON response when creating a dynamic PHP form

I am in need of a dynamic form that functions as follows: Upon clicking the "ADD" button, a new <div> element should appear for selecting a package. Based on the selected package, the row should change its color by adding or removing certain classe ...

Bootstrap datepicker and timepicker icons are misaligned

While working on a Date Picker and Time picker in Bootstrap 4 with bootstrap-datepicker.js and bootstrap-timepicker.js, I encountered an issue. The calendar and time icon are not displaying correctly; they should be inside the input button but instead appe ...